Reverse replication?

Replication is broken at the moment otherwise might have been able to test this for myself. What happens when your source NAS (“NAS1”) goes offline, you start using the destination one (“NAS2”) as primary instead, make changes and want to replicate them back to NAS1 when it returns online? Do you have to delete everything from NAS1, create a new send replication task on NAS2, a receive rep task on NAS1 and start replicating all the data again from scratch? Hope not, better to be incremental.

I’ve been wondering this as well.

Thanks for these questions @grizzly and @bdarcus. I will do a wikified post about this soon. If we can make the failover writes happen in a certain way so that when the NAS1 is back online, we can sync it back up with a new snapshot diff from NAS2, that could work. I am planning to work on fixing up replication in the next update cycle, so more to discuss soon…

Thanks Suman. I’ll take that as a yes for the time being: must delete everything from NAS1 and start sync again.

At the point NAS1 goes offline and stops replicating, I expect there needs to be a “DR\failover Mode” that tells NAS2: “You’re the temporary master. Take a snapshot, because when NAS1 returns you’ll have to replicate everything between now and then back to it”.

Hopefully some BTRFS magic can allow failback from NAS2 --> NAS1 to succeed even if NAS1 was acting as if everything was okay and continued to write data in the meantime…