On 29/09/2021 21:58, Dale wrote:
Since the drive also uses LVM, someone mentioned using snapshots.
Me?
Still not real clear on those even tho I've read a bit about them. Some of the backup technics are confusing to me. I get plain files, even incremental to a extent but some of the new stuff just muddies the water.
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.
I really need to just build a file server, RAID or something. :/
Once you've got your logical volume, what I think you do is ask yourself how much has changed since the last backup. Then create a snapshot with enough space to hold that, before you do an "in place" rsync.
That updates only the stuff that has changed, moving the original data into the backup snapshot you've just made.
If you need to restore, you can just mount the backup, and copy stuff out of it.
That way, you've now got two full backups, but the old backup is actually just storing a diff from the new one - a bit like git actually only stores the latest and diffs, recreating older versions on demand.
From what I gather, you can also revert, which just merges the snapshot back in deleting all the new stuff.
The one worry, as far as I can tell, is that if a snapshot overflows it just gets dropped and lost, so sizing is crucial. Although if you're backing up, you may be able to over-provision, and then shrink it once you've done the backup.
For what I want it for - snapshotting before I run an emerge - guessing the size is far more important because I don't want the snapshot to be dropped half-way through the emerge!
Cheers, Wol

