I am running 2 FreeNAS boxes (let's call them A and B).
A is the production server which contains multiple datasets on mirrored/striped ZFS volumes for sharing via cifs, nfs, etc. A is configured to create snapshots for its datasets, most of them are created hourly and live somewhere between 3 days and 2 months. A replication task is created for each dataset to store it on server B.
B is the backup server which has a bit more storage due to a striped/RAID-Z2 configuration. B is setup to create additional snapshots on the replicated datasets with a larger interval and a longer lifetime (e.g. 3 months for all datasets).
Unfortunately the new snapshots created by B disappear after a while - I guess it is a replication task which cleans up the replicated snapshots and (by accident?) deletes also B's snapshots.
My first idea was to handle snapshot cleanup on B by myself (e.g. via cron job) but I was not able to stop deletion of snapshots at all. Even though I disabled "Delete stale snapshots on remote system" in A's replication task, old snapshots are still removed.
The FreeNAS version is 9.10-STABLE-201604111739
I saw this bug https://bugs.freenas.org/issues/12692 which describes a similar problem - but according to the corresponding revisions the fix should already be available in my FreeNAS version.
So, which task/script/process deletes my snapshots?
I built a test setup using 2 virtualboxes to recreate the scenario above.
I found out that the "Delete stale snapshots on remote system" feature actually works - but as soon as I add an additional snapshot task on B, this task removes the stale snapshots itself. Not sure if this is intended behavior...
Now I have to find out why B's snapshots are deleted.