zfs (zxfer) replication -- "holes" in backups?

Aleksandr Miroslav alexmiroslav at gmail.com
Tue Dec 13 23:45:00 UTC 2016

I'm using zxfer to replicate my ZFS snapshot to another host. Occasionally,
for whatever reason, zxfer can't replicate a particular snapshot.

What I find is that later when zxfer tries again, it skips that snapshot it
couldn't replicate and sends a newer one. This leaves the back up server
with with a "hole", i.
e. a missing snapshot.

For example: I have server with the following snapshots:

*zroot/usr/home at zfs-auto-snap_daily-2016-11-19-00h00  [EXISTS ON
BACKUP]zroot/usr/home at zfs-auto-snap_weekly-2016-11-20-00h00 [EXISTS ON
BACKUP]zroot/usr/home at zfs-auto-snap_daily-2016-11-21-00h00  [EXISTS ON
BACKUP]zroot/usr/home at zfs-auto-snap_daily-2016-11-22-00h00  [EXISTS ON
BACKUP]zroot/usr/home at zfs-auto-snap_daily-2016-11-23-00h00  [MISSING
BACKUP][...]zroot/usr/home at zfs-auto-snap_hourly-2016-12-13-14h00 [MISSING
BACKUP]zroot/usr/home at zfs-auto-snap_hourly-2016-12-13-15h00 [EXISTS ON

Here is my backup server:

*zroot/usr/home at zfs-auto-snap_daily-2016-11-19-00h00*
*zroot/usr/home at zfs-auto-snap_weekly-2016-11-20-00h00*
*zroot/usr/home at zfs-auto-snap_daily-2016-11-21-00h00*
*zroot/usr/home at zfs-auto-snap_daily-2016-11-22-00h00*
*zroot/usr/home at zfs-auto-snap_hourly-2016-12-13-15h00*

Notice that I have backups until the 22nd of November, and there is a huge
gap until the 13th of December.

Usually these gaps are small, one or two missing snapshots...in this
particular case, the backup server was offline for a bit.

When zxfer starts up again, I thought it would resume sending from the last
one, it apparently doesn't do that.

The way I have fixed this manually in the past is to delete the newest
backup on the target server and run zxfer manually. Recently, the missing
backups have gotten so large that this is somewhat painful to do.

Is there something in zfs/zxfer I can change such that the backup server
will always have the latest copy as the master?


More information about the freebsd-questions mailing list