Problems using USB drive sneakernet to seed incremental replication

alugowski

Dabbler
Joined
May 8, 2019
Messages
32
My home FreeNAS, let's call it Sender, has a handful of datasets that I'd like to replicate off-site to another FreeNAS, let's call it Receiver. I already had a Replication Task that would copy those datasets to a pool named usb_backup that lives on an external USB drive. My home upload speed is terrible, and I'm traveling to the remote location anyway, I thought I'd export and travel with usb_backup and use that as a seed for a new incremental backup.

I arrived, and copied the datasets to Receiver using zfs send usb_backup/foo | zfs receive tank/foo.

I then went to set up a new Replication Task on Receiver that will pull that same dataset from Sender. When I did so I got this message:

Destination dataset does not contain any snapshots that can be used as a basis for the incremental changes in the snapshots being sent. The snapshots in the destination dataset will be deleted and the replication will begin with a complete initial copy.

I read that it's possible to do what I'm trying to do, so what did I do wrong? Is it possible to salvage my replication seed? A full transfer will take two weeks, I'd like to avoid that.
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
copied the datasets to Receiver using zfs send usb_backup/foo | zfs receive tank/foo.
That's not the normal way to zfs send | recv ... you need to send a snapshot, not the dataset. Check the source dataset (usb_backup) for snapshots and do the send again with the last one available. That may make it possible to continue replication.
 

alugowski

Dabbler
Joined
May 8, 2019
Messages
32
Thank you @sratella. You're right, I was sending a snapshot. The problem is that I had created a new migrate snapshot and zfs sent that.

I instead deleted the migrate snapshot, found the latest auto-generated snapshot, and used:

Code:
zfs send usb_backup/foo@auto-2020-06-14_00-00 | pv | zfs receive -F tank/foo


and then the Replication Task succeeded quickly as expected. I think my mental model of how snapshots work is missing something. I thought I can use any snapshot as a base, but apparently it matters how the snapshot was created. Thanks for your help!
 
Top