Batch-rename for ZFS snapshots. Renames ZFS snapshots based on a wildcard string.
pool/dataset1@old1 pool/dataset1@old2 pool/dataset2@old1 pool2/dataset1@old1
zfsrename.sh old new
pool/dataset1@new1 pool/dataset1@new2 pool/dataset@new1 pool2/dataset1@new1
zfsrename.sh -D pool1/ old new
pool/dataset1@new1 pool/dataset1@new2 pool/dataset2@new1 pool2/dataset1@old1
zfsrename.sh -D pool/dataset1@ old new
pool/dataset1@new1 pool/dataset1@new2 pool/dataset2@old1 pool2/dataset1@old1
Use --dry-run|-d to see the result without making the actual changes.
Created and maintained by Pawel Ginalski (https://gbyte.dev).