/etc is a weird amalgamation of system- and human-created and edited files.
When reinstalling a system, for instance, one should not copy all files from a backup into /etc, as drive UUIDs, etc. might have changed.
It also isn’t possible to, say, back up files that have changed since the system install datetime (via /etc/machine-id, perhaps), as most files in /etc are touched by system updates.
I use chezmoi to back up my ~/.config, etc. to a github repo, but it doesn’t work with folders outside $HOME.
One approach is to copy /etc into a folder in my $HOME, then pick and choose what to back up from there. But this seems clunky, and perhaps failure-prone.
Also, are there other folders similar to /etc that require the same attention?
Suggestions?
(I do keep regular bare metal backups of /mnt/btrfs-root/root, /mnt/btrfs-root/var, and /mnt/btrfs-root/home, along with Vorta backups of everything else.)
Can’t you just use the native snapshot feature of the btrfs filesystem?
For example my Documents, Pictures folders are in a btrfs subvolume that I created /mnt/userdata . Then symlinked back to $HOME.
I moved my Desktop folder into Documents.
This way for my personal files I can simply backup userdataor use whatever sync tool to sync to a cloud or private cloud.
Or even use a tool like btrbk to daily snapshot and sync this subvolume to a different drive or even to another pc/laptop (btrbk supports ssh).
You could probably create a subvolume /etc1 do a mv /etc/ /etc1/, then delete the first folder and rename the other to /etc.
Now you can easily snapshot, compress sync or do whatever you want with it via btrfs.
I believe (could be wrong) OpenSuse Tumbleweed or Manjaro actually uses separate btrfs subvolumes for these typical Linux folders.
I’m surprised Fedora Silverblue doesn’t leverage the btrfs snapshotting features more.
Thanks. Yeah, I think the above, from my original post, is where a lot of the difficulty comes in.
I have a script that snapshots root, home, and var, then uses rsync to do an incremental backup to an external drive.
I also use vorta to backup up my home and data to my iMac that backs up too Backblaze.
So I’m covered on backups.
But, etc is different due to the mix of system and user configs.