Anno domini 2024 Sat, 28 Sep 08:27:30 -0700
Dan Youngquist via tde-users scripsit:
On 9/27/24 8:56 PM, dep via tde-users wrote:
said Greg Madden via tde-users:
| I used rsync to move files around. Flexible, run with a cron job,
Thanks very much. I'm hoping it works with a mounted drive?
The problem with using rsync to back up a mounted boot partition is, it's
not instant. So while rsync is backing up one part, some other part is
probably being changed. So if you're lucky, you might end up with a
functional bootable backup, but you'll have some unknown bit(s) of
corruption that may or may not be fatal.
If you want to get a good bootable backup, you'd have to boot from something
else before backing up. Then, if you want it to be bootable should you ever
have to restore and use it, fsarchiver would be a better bet than rsync. An
image backup with dd would also work, but the boot partition would have to
be smaller or equal to the backup location.
I intend to oject: filesystem based backup systems do not have the risk of saving a
corrupt filesystems as blockbased backup systems have when done on a mountd filesystem.
The filesystem (as long as it is sane) is always in a cosistent state, while the
blockdevice (as long as mounted) is not. That's why no sane person uses dump/restore
anymore.
As long as you do not run "apt dist-upgrade" at the same time as you rsync you
are fine (in respect of bootable backup). Nothing changes kernel + grub + modules + /bin
... under normal conditions so your copy will be able to boot - that is if your got UUID
and GRUB/EFI stuff right in the first place. What gets busted are logfiles, open
datanbases, files that are just been written. So if you use some brain cells you can shut
down whatever is not essential, close your kmail + editors + firefox and just make the
sync. Snapshots (ZFS) would be better, but you take what you get :)
Anyway,
Nik
--
Please do not email me anything that you are not comfortable also sharing with the NSA,
CIA ...