[Discuss] Dropping obsolete commands (Linux Pocket Guide)

Edward Ned Harvey (blu) blu at nedharvey.com
Wed Nov 11 07:32:28 EST 2015


> From: Discuss [mailto:discuss-bounces+blu=nedharvey.com at blu.org] On
> Behalf Of Chuck Anderson
> 
> According to Ted Ts'o (filesystem developer), it is NOT a recommended
> way to backup your filesystem:
> 
> http://www.gossamer-threads.com/lists/linux/kernel/1197768
> 
> "It does read the mounted block device directly, and so it's certainly
> not a _recommended_ way to back up your ext4 filesystem. It should

That's correct, but unfortunately, it doesn't leave you with anything else you can use. The problem is that the live filesystem can have stuff changing while the operation is in progress. Because you're not using a block-level snapshot. So even if you use something like rsync or rsnapshot, the tool will walk the live filesystem (on top of the filesystem layer, unlike dump which operates below the filesystem layer, but that distinction is irrelevant) the filesystem could be changing while in the middle of an rsync operation. Or tar, or cpio, or whatever. Your database files are not safe with *any* of these tools, because of no block-level snapshot.

If you make a block level snapshot, for example with lvm, you could then safely backup the snapshot block device, just as you could safely mount the snapshot and run rsync. But god, lvm snapshot, what a nightmare.

This is the reason ZFS was invented. Maybe btrfs will be good someday too (maybe it already is).



More information about the Discuss mailing list