In the Unix world, to mitigate issues like you've described, we have 3 methods.
- Use the volume manager to take a snapshot
- Follow normal system backup methods
- Use snapshots AND create backups https://tldp.org/HOWTO/LVM-HOWTO/snapshots_backup.html
"Snapshots" as claimed by most backup tools aren't really snapshots. Proper snapshots are only possible if a volume manager is involved - LVM, ZFS, BTRFS. Anything else is **not** a real snapshot, regardless of the claim. Some backup tools will use a volume manager along with snapshots, if it is available. Timeshift is like that - but
timeshift only does it when BTRFS is used, none of the other volume managers are used and if BTRFS isn't available, it will use
rsync.
rsync is fantastic. I use it daily, but not for proper versioned backups - with or without using a snapshot of the volume manager. Proper, daily, automatic, backups are what differentiate between end-users and professional administrators. There isn't much excuse for not having automatic, daily, versioned, backups these days. A 2TB HDD which can hold hundreds of backup sets is $20-$40. All the software necessary is free. Scripts have been posted which can be used as-is to do that job.
And of course, no backup can be trusted until the restore is tested, so don't forget/avoid doing that critical step. When properly setup and running, backups take a few minutes daily. 1-5min typically. A full restore takes me between 30 and 45 minutes loosely broken down into 3 phases. Fresh OS install, restore all data and settings, and lastly, install the previously installed packages using a list-o-packages that is created daily, just prior to creating backups, so it is always up to date. When the restore is completed, the system will be just like it was at the time the backup was taken (or close enough) that it won't matter.
The method I use avoids having to backup 5-10GB of OS files, since I only backup settings, not programs. Avoiding 5-10GB of backups for each system speeds up all backups, reduces backup storage needs, and simplifies the restore process since at restore time, just a minimal OS is installed. By returning all data and settings to where they were in the directory system during recovery, we've decoupled the storage from the backups. It is not hard to completely change file systems uses on an OS using this method. Going from ext4 to LVM+ext4 or ZFS is pretty easy, even with wiping the entire OS as the 1st step of the restore process.
And if you are using RAID, there are some RAID problems that can only be solved by destroying the RAID array, rebuilding it fresh, then restoring data from backups.
Bookmarks