Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 1 Oct 2021 22:28:16 +0100
From:      Steve O'Hara-Smith <steve@sohara.org>
To:        tech-lists <tech-lists@zyxst.net>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: zfs q regarding backup strategy
Message-ID:  <20211001222816.a36e9acbd4e8829aed3afb68@sohara.org>
In-Reply-To: <YVcXsF5NFq2abE%2B7@ceres.zyxst.net>
References:  <YVZM1HnPuwIUQpah@ceres.zyxst.net> <ba54a415-da45-e662-73fe-65702c4131e2@holgerdanske.com> <YVcXsF5NFq2abE%2B7@ceres.zyxst.net>

next in thread | previous in thread | raw e-mail | index | archive | help
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.

	This sounds nice and simple and is the basis of most homebrew and
packaged zfs replication systems - proper error handling is *difficult*
especially handling errors in the zfs recv phase. Also there is the
irritating detail that one of the properties of a ZFS filesystem is its
mount point and while you can run zfs recv in such a way as not to mount
the received filesystems they will get mounted on reboot which makes
backing up several root filesystems to an archive server a little tricky! 

	The bad news is that I haven't found a solution I really like,
zrepl comes close but it solves that last problem by dropping *all* the zfs
properties in the archive and I'm pretty sure it ignores some error
conditions that eventually lead to an incomplete backup. What I really want
is a rok solid reliable archive server with all the hierarchies archived
mounted read only under something like /archive/<source>/. I haven't got it
yet.

-- 
Steve O'Hara-Smith <steve@sohara.org>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20211001222816.a36e9acbd4e8829aed3afb68>