Gentoo Archives: gentoo-user

From: Hans de Graaff <graaff@g.o>
To: gentoo-user@l.g.o
Subject: [gentoo-user] Re: incremental ZFS backups
Date: Sun, 06 Mar 2016 12:15:14
Message-Id: s1eqqc-3q9.ln1@graaff.xs4all.nl
In Reply to: [gentoo-user] incremental ZFS backups by lee
1 On Sat, 05 Mar 2016 01:23:08 +0100, lee wrote:
2
3 > I haven't found any documentation about how to deal with all the
4 > snapshots which would be created over time. Can they be destroyed once
5 > the backup is finished? A full backup took about 48 hours, so something
6 > faster is needed, and I don't want to end up with hundreds or thousands
7 > of snapshots by making new ones every day without being able to ever
8 > destroy them.
9
10 You might want to look at sys-fs/zfstools in my "graaff" overlay. It
11 manages snapshots automatically. There are other similar tools as well.
12
13 > Basically, documentation says that such incremental backups are awesome
14 > because you get a 1:1 copy and only need to transfer what has changed
15 > after a previous backup as if you would use rsync, but that it's better
16 > than that and you can do it in like no time. It doesn't really say how
17 > to actually do that and what to do with all the snapshots, though.
18
19 You can use "zfs send" and "zfs receive" for this. Once sent the snapshot
20 can be deleted.
21
22 > I also can only guess that enabling compression on the target FS won't
23 > work unless compression is enabled at the source, though it would be
24 > rather useful to have the backups compressed while the source is not.
25 > You could do that with rsync, though, but I don't know how to access the
26 > snapshot for that.
27
28 zfs send and receive don't handle compression. You get and transmit the
29 uncompressed data. So this works for any combination of compressions
30 settings on the sending and receiving data sets.
31
32 Hans