1 |
On 30/09/2021 00:17, Rich Freeman wrote: |
2 |
> On Wed, Sep 29, 2021 at 5:48 PM Wols Lists<antlists@××××××××××××.uk> wrote: |
3 |
>> An LVM snapshot creates a "copy on write" image. I'm just beginning to |
4 |
>> dig into it myself, but I agree it's a bit confusing. |
5 |
|
6 |
> So, snapshots in general are a solution for making backups atomic. |
7 |
> That is, they allow a backup to look as if the entire backup was taken |
8 |
> in an instant. |
9 |
> |
10 |
> The simplest way to accomplish that is via offline backups. Unmount |
11 |
> the drive, mount it read-only, then perform a backup. That guarantees |
12 |
> that nothing changes between the time the backup starts/stops. Of |
13 |
> course, it also can mean that for many hours you can't really use the |
14 |
> drive. |
15 |
> |
16 |
> Snapshots let you cheat. They create two views of the drive - one |
17 |
> that can be used normally, and one which is a moment-in-time snapshot |
18 |
> of what the drive looked like. You backup the snapshot, and you can |
19 |
> use the regular drive. |
20 |
|
21 |
Yup. I'm planning to configure systemd to do most of this for me. As a |
22 |
desktop system it goes up and down, so the plan is a trigger will fire |
23 |
midnight fri/sat, and the first time it gets booted after that, a |
24 |
snapshot will be taken before fstab is run. |
25 |
|
26 |
Then I'll have backups of /home and /. I won't keep many root backups, |
27 |
but I'll keep /home until I run out of space. |
28 |
|
29 |
And that's why I suggested if you want a separate backup rather than a |
30 |
collection of snapshots, you snapshot the backup and use in-place rsync. |
31 |
Of course that still means you need to quiesce the bit you're copying, |
32 |
but you could back it up piecemeal. |
33 |
|
34 |
Cheers, |
35 |
Wol |