How to expire replicated snapshots on remote system

ilium007

Explorer
Joined
Apr 9, 2012
Messages
61
Hi - I have two FreeNAS FreeNAS-11.2-RELEASE-U1 systems set up to experiment with snapshot replication and system recovery before I implement at work.

I have a dataset on the source system with 15min snapshots an 1hr retention, this is all working fine. I have configured replication to the secondary FreeNAS system and that is also working fine.

What I am trying to do is work out how to expire / remove snapshots on the remote system. Is this only achievable using a cron job running a script ?

I have searched the forums and can't find a similar thread.

I have found a script that works fine, assume I would just schedule this to run every x mins:

https://github.com/bahamas10/zfs-prune-snapshots
 
Last edited:

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
I would have thought that using the "delete stale snapshots on remote system" option in the replication job would do it fine (assuming you set an appropriate expiry age on your snapshots on the primary system).
 
Top