openzfs / zfs

OpenZFS on Linux and FreeBSD
https://openzfs.github.io/openzfs-docs
Other
10.47k stars 1.74k forks source link

add a recursive option to zfs rollback #2958

Open GregorKopka opened 9 years ago

GregorKopka commented 9 years ago

It would be great to have the option to rollback a complete dataset subtree, similar to zfs snapshot/destroy -r .

Sadly for zfs rollback -r is already used for recursive on the specified dataset (insted of the children, which is counterintuitive since on all other functions -r operates on child datasets).

Nevertheless, a way to rollback a complete subtree would be handy.

behlendorf commented 9 years ago

This sounds like a good use case for the propsed ZFS channels interface.

http://open-zfs.org/wiki/Projects/ZFS_Channel_Programs

RubenKelevra commented 8 years ago

Very nice feature! Would appreciate that.

loli10K commented 6 years ago

The ZFS Channel Programs project was recently merged: both zfs.list.children() and zfs.sync.rollback(), with some limitations (see below), can be used to perform recursive rollbacks.

Rollbacks can be performed on filesystems or zvols, but not on snapshots or mounted datasets. EBUSY is returned in the case where the filesystem is mounted.

GregorKopka commented 6 years ago

I take it the same limitation (root only, as I suspect in https://github.com/zfsonlinux/zfs/issues/6041#issuecomment-364744480) applies?

RubenKelevra commented 6 years ago

@GregorKopka I was wondering if this feature request is completed, for you? In this case, feel free to close it.

GregorKopka commented 6 years ago

As long as it is root only (can't be delegated to normal users): not really completed.