What is Nostr?
FreeBSD Fortune /
npub1f9u…4yrh
2024-03-15 18:00:47

FreeBSD Fortune on Nostr: You can prevent the removal of a ZFS snapshot by using the hold subcommand. For ...

You can prevent the removal of a ZFS snapshot by using the hold subcommand.
For example, to prevent the snapshot called milestone from deletion, run the
following command:

# zfs hold milestone_hold mypool/projects@my_milestone

The "zfs holds" command will list all current snapshots that are protected
this way (-r for a recursive list):

# zfs holds -r mypool

The TIMESTAMP column in the output of the above command is from when the
hold was created, not the snapshot it holds. The "zfs destroy" command will
echo a "dataset is busy" message on the console when it encounters a hold.
Use "zfs release" to release the hold on the snapshot:

# zfs release milestone_hold mypool/projects@my_milestone

-- Benedict Reuschling <bcr@FreeBSD.org>
Author Public Key
npub1f9ujkrp7sqamjl6qqhur4rtvpxjccm487p8p4vvazj0el2amem3shm4yrh