→ Applies to: SynetoOS 4.8.5 and above
Step 1. Connect to SynetoOS appliance via SSH as admin
ssh admin@<your_ip_address_or_hostname>
Step 2 (optional). Change into Solaris shell (in case you're directed to an unsupported shell)
un sh
Step 3. Get root privileges
sudo su -
Step 4. List snapshots services
synetoid list
EXAMPLE OUTPUT
root@syneto-os4:/var/storage/admin# synetoid list online May_19 svc:/system/filesystem/zfs/auto-snapshot:weekly-flash--datastores--VM1 online May_19 svc:/system/filesystem/zfs/auto-snapshot:weekly-flash--datastores--VM2 online 13:30:04 svc:/system/filesystem/zfs/auto-snapshot:daily-flash--datastores--VM1 online 14:00:05 svc:/system/filesystem/zfs/auto-snapshot:daily-flash--datastores--VM3 online 15:00:04 svc:/system/filesystem/zfs/auto-snapshot:daily-flash--datastores--VM4
From the list, identify the VM on which the retention policy should be applied.EXAMPLE
svc:/system/filesystem/zfs/auto-snapshot:weekly-flash--datastores--VM1
Step 5. List the number of snapshots (replace <pool_name> and <vm_name> with the correct information)
zfs list -r -t snapshot <pool_name>/datastores/<vm_name> | wc -l
EXAMPLE OUTPUT
zfs list -r -t snapshot flash/datastores/VM1 | wc -l 20
The value 20 represents the total number of snapshots for that datastore.
Step 6. Apply retention (replace <type_protection>, <pool_name> and <vm_name> with the correct information)
synetoid apply-retention svc:/system/filesystem/zfs/auto-snapshot:<type_protection>-<pool_name>--datastores--<vm_name>
EXAMPLE
synetoid apply-retention svc:/system/filesystem/zfs/auto-snapshot:weekly-flash--datastores--VM1
Step 7. Check if the retention policy has been applied (replace <pool_name> and <vm_name> with the correct information)
zfs list -r -t snapshot <pool_name>/datastores/<vm_name> | wc -l
EXAMPLE OUTPUT
root@syneto-os4:/var/storage/admin# zfs list -r -t snapshot flash/datastores/VM1 | wc -l 12
The value 12 represents the total number of snapshots for that datastore.
If the number of snapshots has changed from what you recorded in step 5, the procedure was successful.