On 30/09/2021 00:17, Rich Freeman wrote:
On Wed, Sep 29, 2021 at 5:48 PM Wols Lists<[email protected]>  wrote:
An LVM snapshot creates a "copy on write" image. I'm just beginning to
dig into it myself, but I agree it's a bit confusing.

So, snapshots in general are a solution for making backups atomic.
That is, they allow a backup to look as if the entire backup was taken
in an instant.

The simplest way to accomplish that is via offline backups.  Unmount
the drive, mount it read-only, then perform a backup.  That guarantees
that nothing changes between the time the backup starts/stops.  Of
course, it also can mean that for many hours you can't really use the
drive.

Snapshots let you cheat.  They create two views of the drive - one
that can be used normally, and one which is a moment-in-time snapshot
of what the drive looked like.  You backup the snapshot, and you can
use the regular drive.

Yup. I'm planning to configure systemd to do most of this for me. As a desktop system it goes up and down, so the plan is a trigger will fire midnight fri/sat, and the first time it gets booted after that, a snapshot will be taken before fstab is run.

Then I'll have backups of /home and /. I won't keep many root backups, but I'll keep /home until I run out of space.

And that's why I suggested if you want a separate backup rather than a collection of snapshots, you snapshot the backup and use in-place rsync. Of course that still means you need to quiesce the bit you're copying, but you could back it up piecemeal.

Cheers,
Wol

Reply via email to