Replication, am I just stupid?

TrueNAS Core 13.3_U1 on both machines.

While using the replication task for the first time I managed to wipe out the target dataset and I want to figure out if I’m just stupid, the documentation is inadequate, or …

The first time I tried to run the task I got an error, so after some (but not enough) reading (including the help message) I turned on “Replication from scratch.”

If the destination system has snapshots but they do not have any data in common with the source snapshots, destroy all destination snapshots and do a full replication. Warning: enabling this option can cause data loss or excessive data transfer if the replication is misconfigured.

I don’t believe that the dataset had any snapshots, but even so the most I expected was that I’d lose the snapshots, not the head, i.e., the entire dataset.

After some MS CoPilot’ing I now understand that the target of a full replication needs to be empty and that I made the mistake of confusing zfs send/receive with a syncing tool (even though if I had stopped to think about it I knew better). It seems to me that a better help message would have jarred my thinking enough to have prevented my error. I think that the documentation needs to be much more specific about what a “Replication from scratch” / full replication is, that it needs an empty target, and that a non-empty target–not just snapshots–will be wiped out.

Note, I haven’t lost anything, it’s just going to take 2 or 3 days for the replication to recreate the backup.

Thoughts?

How did you configure the Replication Task?

Did you tie it to a specific Snapshot Task?


Why was there a target dataset in the first place? Was it actually pre-populated with data?

You should let the replication (from the source) create the target dataset on its first run. This is the most ideal and intuitive way to do it.

The problem is that the GUI does not make this obvious. You won’t “see” the target dataset on the destination’s selector. But you can still manually type in the name of the desired destination dataset.

If you want the “target” to be:
backup/media/photos

But the only available selection is:
backup/media

You can manually type in /photos at the end of the name.

The current information is quite explicit:

If the destination system has snapshots but they do not have any data in common with the source snapshots, destroy all destination snapshots and do a full replication.

Any data on the destination that is unrelated with what’s to be replicated will be deleted.
From scratch” is also quite explicit, I think. Tabula rasa.