Gentoo Archives: gentoo-user

From: Wols Lists <antlists@××××××××××××.uk>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] How to compress lots of tarballs
Date: Wed, 29 Sep 2021 21:45:11
Message-Id: 0aa6539b-958f-53f9-a6a2-ad5e984a0d85@youngman.org.uk
In Reply to: Re: [gentoo-user] How to compress lots of tarballs by Dale
1 On 29/09/2021 21:58, Dale wrote:
2 > Since the drive also uses LVM, someone mentioned using snapshots.
3
4 Me?
5
6 > Still
7 > not real clear on those even tho I've read a bit about them.  Some of
8 > the backup technics are confusing to me.  I get plain files, even
9 > incremental to a extent but some of the new stuff just muddies the water.
10
11 An LVM snapshot creates a "copy on write" image. I'm just beginning to
12 dig into it myself, but I agree it's a bit confusing.
13 >
14 > I really need to just build a file server, RAID or something.  :/
15
16 Once you've got your logical volume, what I think you do is ask yourself
17 how much has changed since the last backup. Then create a snapshot with
18 enough space to hold that, before you do an "in place" rsync.
19
20 That updates only the stuff that has changed, moving the original data
21 into the backup snapshot you've just made.
22
23 If you need to restore, you can just mount the backup, and copy stuff
24 out of it.
25
26 That way, you've now got two full backups, but the old backup is
27 actually just storing a diff from the new one - a bit like git actually
28 only stores the latest and diffs, recreating older versions on demand.
29
30 From what I gather, you can also revert, which just merges the snapshot
31 back in deleting all the new stuff.
32
33 The one worry, as far as I can tell, is that if a snapshot overflows it
34 just gets dropped and lost, so sizing is crucial. Although if you're
35 backing up, you may be able to over-provision, and then shrink it once
36 you've done the backup.
37
38 For what I want it for - snapshotting before I run an emerge - guessing
39 the size is far more important because I don't want the snapshot to be
40 dropped half-way through the emerge!
41
42 Cheers,
43 Wol

Replies

Subject Author
Re: [gentoo-user] How to compress lots of tarballs Rich Freeman <rich0@g.o>