Replicated snapshot are not destroyed by retention policy

Hello,

I’ve created a replication task for my pool a while ago. It copies the snapshots to my local backup HDD via USB. The replication is working well. However, I’ve discovered, that the snapshots on the backup-pool won’t get deleted altough the replication task should be configured this way.


My datasets are looking the following:


What am I’m missing here?

Which part shows the snapshot deletion policy?

It says “same as source” why not specify a time limit?

Out of interest why are you not matching your replication to your Periodic Snapshot Task/s? Think that’s the issue here.

Thanks for your replies. First of all i should mention, that I’m using an external HDD for my backups which is most of the time unplugged. Once in a week I plug it in and trigger the replication task manually. Therefore, I’m not matching the replication task with the periodic snapshot tasks.

I got three snapshot tasks like the following:


The other two are looking similar. The snapshots are kept for:
Hourly: 1 week
Daily: 2 weeks
Weekly: 4 months

So in my understanding the replication task is configured with the “Snapshot Retention Policy: Same as source”. This should use the above defined lifecycle of the snapshot tasks. If a snapshot on my external HDD does not exist on TrueNAS anymore, it should be deleted. However this does not happen. Or am I misunderstanding something?

Same as source refers to a matched snapshot task. You did not set any. (left column in your screenshot) There needs to be a 1:1 mapping of snapshot task to replication task for this to work.

I doubt with the way you manage replication a time frame would work, either. Because that does not rely on the actual age of the snapshots but on the dates coded in the naming scheme - again needing a single scheme for all snapshots replicated.

2 Likes

Thanks for the clarification, I knew i missunderstood something!

So what would you recommend for a strategy? I want to keep the manual sync with my HDD. Additionally, I also want to keep the size of snapshots on my backup dataset equal to my working dataset.

As far as i understand, I can do one replication task for each snapshot task. The downside is, I need to trigger 3 replication tasks manually instead of one, but thats ok for me. The only thing I have to adjust is inside the edit screen of my replication tasks, that I need to select a matching periodic snapshot task, right? This would look like:

Hourly Snapshot Task → Hourly Replication Task
Daily Snapshot Task → Daily Replication Task
Weekly Snapshot Task → Weekly Replication Task

Edit: I’ve just selected the all the periodic snapshot tasks inside the replication task and now the amounts of snapshots on my backup dataset are equal to my primary dataset. So it seems like I do not need to make one replication task for each snapshot task.

1 Like