TrueNAS Replication: Problems with PULL task

Breit

Dabbler
Joined
Oct 4, 2016
Messages
25
Hi there!

I'm trying to set up a replication PULL task in TrueNAS to backup a FreeBSD server using ZFS onto my NAS over SSH.

On the FreeBSD server side, I've set up an auto snapshot task which does weekly backups using zfs-auto-snapshot. This seems to work fine and creates snapshots and also removes them after the retention policy says so.

On the TrueNAS side, I've set up a replication PULL task over SSH which should recursively pull those weekly backup snapshots from the boot-pool (called 'zroot'). This starts OK, begins to copy stuff and then does fail after some time.

If I do a manual snapshot on the FreeBSD server side and PULL that to TrueNAS recursively, that works fine and completes.

After a lot of debugging, I figured that zfs-auto-snapshot does not create snapshots for every dataset in the zfs tree. For instance the tree looks something like this:
  • zroot
    • ROOT
      • default
    • usr
      • home
      • ports
      • src
... and so on

Now 'zroot' gets a snapshot, 'zroot/ROOT/default' also gets a snapshot, but 'zroot/ROOT' does not get a snapshot. I believe this is what bugs zettarepl and where it fails to continue. Is there a way to either force zfs-auto-snapshot to create snapshots for every dataset in the tree or make zettarepl continue for child-datasets, even when the parent does not have a snapshot fitting into the scheme?

A manual snapshot creates a snapshot for every child dataset in the tree and this is probably the reason why the PULL replication task succeedes here. I've also checked properties on 'zroot/ROOT', it is not excluded from the weekly snapshot schedule. I also do these snapshots with the '-k' option meaning it should keep empty snapshots.
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
using zfs-auto-snapshot. This seems to work fine and creates snapshots and also removes them after the retention policy says so
I don't think that's going to be a great solution unless you pay very close attention to your policy... zettarepl wants to control the snapshots on both sides usually.

I don't think you can be messing with intermediate snapshots outside of what zettarepl expects.
 

Breit

Dabbler
Joined
Oct 4, 2016
Messages
25
Can zettarepl create snapshots on the remote side (source) for PULL configurations? That would be great, but I wasn't able to configure it this way using the GUI in TrueNAS?!
 
Top