Renaming ZFS Snapshots
You can rename snapshots, but only within the same pool and dataset from which they were created. For example:
$ zfs rename system1/home/kaydo@snap1 system1/home/kaydo@today
You can also use the following shortcut syntax:
$ zfs rename system1/home/kaydo@snap1 today
The following snapshot rename
operation is not supported because the target pool and file system name are different from the pool and file system where the snapshot was created:
$ zfs rename system1/home/kaydo@today pool/home/kaydo@saturday
cannot rename to 'pool/home/kaydo@today': snapshots must be part of same
dataset
You can recursively rename snapshots by using the zfs rename -r
command. For example:
$ zfs list -t snapshot -r users/home NAME USED AVAIL REFER MOUNTPOINT users/home@now 23.5K - 35.5K - users/home@yesterday 0 - 38K - users/home/glori@yesterday 0 - 2.00G - users/home/hsolo@yesterday 0 - 1.00G - users/home/nneke@yesterday 0 - 2.00G - $ zfs rename -r users/home@yesterday @2daysago $ zfs list -t snapshot -r users/home NAME USED AVAIL REFER MOUNTPOINT users/home@now 23.5K - 35.5K - users/home@2daysago 0 - 38K - users/home/glori@2daysago 0 - 2.00G - users/home/hsolo@2daysago 0 - 1.00G - users/home/nneke@2daysago 0 - 2.00G -