Date: Sun, 3 Oct 2021 00:21:24 +0100 From: tech-lists <tech-lists@zyxst.net> To: freebsd-questions@freebsd.org Subject: Re: zfs q regarding backup strategy Message-ID: <YVjpdBT%2BrtTYtUvI@ceres.zyxst.net> In-Reply-To: <20211001222816.a36e9acbd4e8829aed3afb68@sohara.org> References: <YVZM1HnPuwIUQpah@ceres.zyxst.net> <ba54a415-da45-e662-73fe-65702c4131e2@holgerdanske.com> <YVcXsF5NFq2abE%2B7@ceres.zyxst.net> <20211001222816.a36e9acbd4e8829aed3afb68@sohara.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--Cvx1CJLqaQgzmSfz Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Oct 01, 2021 at 10:28:16PM +0100, Steve O'Hara-Smith wrote: >On Fri, 1 Oct 2021 15:14:08 +0100 >tech-lists <tech-lists@zyxst.net> wrote: > >> What I'm looking for is something (ideally) written in sh. Or even perl. >> But even before that, need to understand incremental backups properly. >> Basically the backup needs to be (effectively) write-only. By that, I >> mean only added to. > > With zfs send every stream is a send up to some 'target' snapshot, >a full stream is the complete history while an incremental stream is from >an earlier 'source' snapshot. > > It is therefore necessary for any successful incremental backup >system to know what the last snapshot sent was so that the next cycle can >start by creating a new snapshot and sending the increment from the last >sent to the latest. On the receiving end the options are to either store >each send as a file named in such a way as to make it obvious what order to >process them in should restore be needed or (more usefully) to use zfs recv >to load them into filesystems in a pool on the receiving machine. If you do >this there will be no pruning of the received snapshots unless you set >something up to do it. OK. if I think I understand correctly then if we need to keep everything th= en=20 I'll need to keep every incremental snapshot. Let's say there are 3 files in a zfs dir 1, 2 & 3 full backup happens on day 1, all three files are fully backed up first snapshot happens on day 2: theres nothing added nothing removed becau= se nothing changed at source second snapshot happens on day 3, file 2 disappears at source so the=20 difference is this file is not there but the other two are. third snapshot happens file 2 of the same name appears at source but has different content. A month (30 days) later someone looks for file 2 as it was on day 1, and it's not the one they expected on the source. So I have to get it from the backup somehow. In order to do this, and given that when I'm looking for this I might not know *when* file 2 was deleted from the source, then changed and then added, do I have to keep every single snapshot? If this is the case, then how can I scan through the snapshots looking for the right file? there may be thousands of snapshots. Or can I incorporate or expire the snapshots into the full backup and tell it that I want to look back to day 1 and retreive file 2? The reason I'm thinking this might be possible is via zfs redundancy. copies=3D3 that sort of thing. Like a time machine but for a backup, I guess. Or some other method that I've not understood (there's lots about zfs I don't understand) or haven't read about yet? thanks, --=20 J. --Cvx1CJLqaQgzmSfz Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEE8n3tWhxW11Ccvv9/s8o7QhFzNAUFAmFY6WsACgkQs8o7QhFz NAVELw//bi/KHoGaBOLH+cxTBlZJsuQ7SYNwdQk+nWGvU/sOS21yPJCAgaCfg5PU cc4r6SCxnYtlEY9hmmhipqJgqWUES19yKoYWlgVIropYRXeO/iQpvixzY7HlI3uN XX0gVBNh3i0Q3CC2FPNBgsRPOfWgLskkDmw+cRSSRbp8DZJU8Vq6R3Rs4QoNQpC7 y34yTtK1cnNNIMdI52ZuJ1++28lBN+qR7wMam5vIdT6DEKfzaAPKn6FwuVSOMTZG v3eTipCocM1jpHPuA2PrVF9tg/Wc4trORKbRvnqpWpm+2/4WJr7vuHqCfRQD70o9 byptIb3SVU7OhHB/XCHSyV2MyDSjpFXsOJD/CDDXUgG6sNCtQ4+hqF6+1ZWF4EpM ORmvqjrF+peOrLbS0QFA7f+XKNVPqvOwR+yT75WFLrUs48hzeOMMzAsUwFgFaN3z /IertI7zl3wAjJ0GTg545PgByPZXR83G+IVv2JbD1mGZi6vxYpugLoDqlqHt9tOO 7DqHgHXzrxkbkOP4RnO30mVdEa2f5HPCW/NsbnOHvxyzB4YFGBTc0/PIFlGN81hW +PJrrmnjAaQKYdQEPdEZGRGFTiaFdV0MtY/7fJs0LBJhIprntstmWCztoPHDdh0W uaCHbQoQfouC0HkKK8GgOioZUdSqpeWcbxb3tCRDya3xbdhr9XE= =7zsW -----END PGP SIGNATURE----- --Cvx1CJLqaQgzmSfz--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?YVjpdBT%2BrtTYtUvI>