ZFS: Rollback snapshot but keep newer snapshots -
i have following zfs snapshots:
data/server/dev1@snap1 data/server/dev1@snap2 data/server/dev1@snap3
if want rollback snap1
, following:
zfs rollback data/server/dev1@snap1
but zfs returns:
more recent snapshots or bookmarks exist use '-r' force deletion..
i know there possibility copy files out of /data/server/dev1/.zfs/snapshot/snap1
/data/server/dev1
takes longer zfs rollback
.
is there way rollback and keep newer snapshots snap2
& snap3
?
update 21/11/2016
it looks there way this. read working zfs promote
, zfs clone
not figure out how works.
i think comment pretty close getting want. however, rename file system before cloning clone name of original file system. example:
zfs rename data/server/dev1 data/server/dev2 zfs clone data/server/dev2@snap1 data/server/dev1
you don't have worry promoting until need delete data/server/dev2@snap1
the zfs man page has more complete example may or may not address needs more specifically:
the following commands illustrate how test out changes file system, , replace original file system changed one, using clones, clone promotion, , renaming:
# zfs create pool/project/production populate /pool/project/production data # zfs snapshot pool/project/production@today # zfs clone pool/project/production@today pool/project/beta make changes /pool/project/beta , test them # zfs promote pool/project/beta # zfs rename pool/project/production pool/project/legacy # zfs rename pool/project/beta pool/project/production once legacy version no longer needed, can destroyed # zfs destroy pool/project/legacy
Comments
Post a Comment