Changing remote ZFS replication target

I’m trying to find a specific procedure for migrating a zfs replication target from one TrueNAS Scale instance (Bluefin) to another (DragonFish).

My current design consists of 1 onsite/production TrueNAS-SCALE (Cobia) replicating (using the builtin ZFS replication) over VPN/WAN to a remote TrueNAS-SCALE (Bluefin). For technical reasons I need to rebuild the remote replication target but I have the resources to spin up a second instance in order to locally replicate the data from the original remote replication target to the new remote replication target locally at the remote site. Once the data is fully replicated (using ZFS replication), I’d like to cut over the original production source to point to the newly created replication target w/o having to send all that data over the WAN. I’m sure I’m not the first to come across this scenario so I’m just looking for some documentation, if such a thing exists. I’ve done this multiple times with TrueNAS instances being rsync targets, but I’m not sure ZFS replication is going to be as forgiving.

I believe, as long as the same snapshots are on both targets, you can cut over.

Or put another way, when you do cut over, the replication should continue from the newest common snapshot.

It should just be a matter of changing the replication destination on the source.

More concretely, replicate all the snapshots from the original offsite, to the new offsite…

then when completed, target the new offsite from the source.

1 Like