ZFS ZFS dataset already exists

I tried to make a new snapshot for the second time in my life (new to ZFS).

# zfs snapshot -r zroot@snapshot

Code:
cannot create snapshot 'zroot@snapshot': dataset already exists

I'm guessing I need to destroy the old snapshot first, if I want to use the same name again?
(going to use another name from now on, like "srv07-full-snap")

Is it COMPLETELY SAFE to run # zfs destroy -r zroot@snapshot to remove all snapshots named "snapshot"?

Code:
# zfs list -t snapshot
NAME                                  USED  AVAIL  REFER  MOUNTPOINT
zroot@snapshot                          0B      -    96K  -
zroot/ROOT@snapshot                     0B      -    96K  -
zroot/ROOT/default@snapshot          1.22G      -  15.8G  -
zroot/home@snapshot                     0B      -    96K  -
...

# bectl list
(If needed to be taken in account?)

Code:
BE      Active Mountpoint Space Created
default NR     /          20.4G 2026-03-30 11:17

Thanks,
 
Is it COMPLETELY SAFE to run # zfs destroy -r zroot@snapshot to remove all snapshots named "snapshot"?
It depends. Snapshots provide the user a means to view and access (parts or all) of your system storage taken at some previous point in time.

No, if you want to retain these snapshots for further use in the future: once deleted you cannot get it/them back (it does however free-up space taken up by the snapshots). However, you do not need to use zfs-destroy(8) just because of the name, simply use zfs-rename(8).

Yes, if you want to just free up this particular (recursive) series (you've used zfs snapshot -r zroot@snapshot) of snapshots in this pool identified by 'snapshot'. As you mentioned a more flexible naming scheme for future snapshots will serve you better.

# bectl list
(If needed to be taken in account?)
A Boot Environment (BE) is a special kind of snapshot. You may find something I wrote earlier helpful:
Boot Environment & snapshot - important ZFS features
 
Back
Top