|
|
|
|
|
by LinuxBender
1509 days ago
|
|
I can describe my method that has worked well for a few decades but it might not be for everyone. Before planning a backup I first ensure all the files I care about are isolated into unique directories not shared by anything I don't care about. e.g. /data/something_unique /opt/something_unique /home/username/something_unique and so on. something_unique just being a unique directory that contains anything or everything I care about. One could also define other shared directories in rsnapshot like /home/username/.config or the entire home directory if you have the disk space for it. I then have rsnapshot installed and it will be a local snapshot of files I consider important enough that I want a few versions of. RSnapshot is just a perl script that uses hardlinks to reduce disk space usage of duplicate files. Rsnapshot is executed in crond. I rsync that snapshot over to a NAS. Rsync is also called by crond. If files are very important I will also copy them to a portable NAS and put it in my vehicle. Anything not defined in /etc/rsnapshot.conf will be files I do not care about and will be treated as ephemeral just like the rest of the OS. If one does not have their OS set up to be ephemeral (cattle vs kittens) then another lesser-secure option might be to keep your important files in a unique LVM volume and use lvchange to set that volume read-only to reduce the risk of the OS upgrade from touching it. [1] - https://rsnapshot.org/ |
|