clicky wrote: ↑
Sun Aug 18, 2019 10:41 am
Wouldn't just simple rsync do the job?
Code: Select all
sudo rsync -axv / /mounted-backup-drive
(of course with caveat about potentially inconsistent system...)
The Debian systemback.sh script mentioned above is using rsync, except there are so many training wheels attached that it seems much more likely to fall over than a single rsync command.
The backup method I described above
is also based on rsync but has the advantage of using a copy-on-write filesystem for the backup disk to implement incremental backups. Incremental backups are important because there is no way of knowing whether the new backup is a good one until it's finished. In fact months can pass after making a backup before it's understood that something needs to be restored from even earlier.
My experience has been that as long as one doesn't perform any deb package management during the rsync command, the resulting backup is consistent enough. As a result, you may want to disable all automatic updates before running the rsync command.