Automatic ZFS pull replication with linked snapshots

Is there any way to have a pull replication task on my standby TrueNAS automatically see that a new snapshot has appeared on the primary and replicate it immediately? Without relying on schedules?

What I see is that if both snapshot and replication tasks are setup on the same server (e.g. the primary, so they pushed to the secondary), you are able to make this link using the ‘Periodic Snapshot Tasks’ selector. But when attempting the same setup in a pull config, the standby cannot see the snapshots task on the primary and it isn’t available for selection with this feature.

Can the snapshots task for the primary’s dataset be setup and run from the standby as well? I guess that would resolve it but I don’t think this is possible? Interested in any advice on my options here.

Running the pull task e.g. every hour isn’t an option? It won’t harm to run it more frequently than the snapshot creation. If there’s nothing to replicate it will just terminate with an “ok/green” status.

Thanks, that’s certainly an option. In light of the fact that pull rep is more secure in theory, and many people who pull to a standby might keep it offline most of the time (also great for security), it would be useful to have the standby able to come online and look at what new snapshots are waiting. Just thoughts.

Do you see any issues with running the pull rep task more frequently, say every 10 minutes? If a replication tasks is still busy, will that cause it to skip the next schedule until it’s complete/free again? Or will they trip over each other and run multiples in parallel? Most of my snapshots will be pretty small but occasionally I might have one that takes much longer to replicate. How would your suggestion cope in that instance?

Looking into it I see hourly is the most frequent option and the running task will not be interrupted by subsequent ones. One suggestion I would make is to maybe offer an additional option to only run the replication task at system startup. That might be useful for folks running cold standby pull rep.

you need something like - lsyncd, getting to work with truenas is another story. my previous company use lsyncd to mirror webservers.