SynetoOS 5: snapshots deleted via CLI still show as recovery points in the GUI

On a SynetoOS 5 appliance I removed a bunch of old snapshots with zfs destroy from the shell. zfs list -t snap confirms they’re gone, but the GUI still lists them as recovery points for the VMs. If someone tries to restore from one of those it obviously won’t work. How do I get rid of these ghost entries?

The GUI reads recovery points from the scheduler database, not directly from ZFS, so when you destroy snapshots from the CLI the DB rows stay behind. On OS5 there’s a cleanup script that deletes the rows with no matching snapshot. It’s OS5 only and won’t work on OS6.

Before you start: make sure no protection is running or about to run, and that all the pools you care about are online (otherwise it would think their snapshots are missing and delete their recovery points too).

  1. SSH in and become root:
    ssh admin@<your_ip_address_or_hostname>
    sudo su
    
  2. Do the CLI snapshot deletion first if you haven’t finished it.
  3. Create /tmp/delete-recovery-points.sh with the script from How to Delete Unlinked Snapshots from GUI in SynetoOS 5, copied exactly.
  4. Make it executable and run it:
    chmod +x /tmp/delete-recovery-points.sh
    /tmp/delete-recovery-points.sh
    
    It asks you to confirm the preconditions, prints how many snapshots it found, lists the recovery points it’s going to remove, and asks again before deleting.
  5. Remove the script afterwards:
    rm /tmp/delete-recovery-points.sh
    

If it says “No snapshots found. Are pools online?”, stop and check your pools; it bails out on purpose in that case.

Ran it, it listed exactly the recovery points I’d destroyed and they’re gone from the GUI now. Thanks.