On Linux regular users have permissions to:
- Take Snapshots of their Home directory Dataset
- Destroy the Snapshots
- Rollback Snapshots
- Receive unmounted Snapshots for storing them as back up from elsewhere.
- Send Snapshots to remote locations.
To take a snapshot of dataset
rpool/USERDATA/user3853_2bv9ey enter a name after
zfs snapshot rpool/USERDATA/user3853_2bv9ey@SnapshotName
Destroy a snapshot.
zfs destroy rpool/USERDATA/user3853_2bv9ey@t353
Delete all snapshots on dataset
user3853_2bv9ey, by adding
zfs destroy rpool/USERDATA/user3853_2bv9ey@%
Rolling back to a Snapshot will revert the Dataset back to what it was at that time. Data currently on it will be replaced by data from the Snapshot, so if you need the current data move it elsewhere. All consequent Snapshots will be destroyed, ZFS will complain you have to use
zfs rollback -r rpool/USERDATA/user3853_2bv9ey@t
When sending and receiving Snapshot use
-u flag to tell ZFS not to try to mount it. This also prevents the creation of empty directories where the dataset would have been mounted.
zfs send rpool/USERDATA/user3853_2bv9ey@today | zfs recv -u rpool/USERDATA/user3853_2bv9ey/newdataset
zfs send rpool/USERDATA/user0_sosjq3@snap | ssh user3853@localhost zfs recv -u rpool/USERDATA/user3853_2bv9ey/snapnomount
When sending incremental Snapshots use the flag
-i, and use the flag
-F for receiving.
-F forces rollback or Dataset, as the data has now changed.
zfs send -i rpool/USERDATA/user0_sx0jq9@inc rpool/USERDATA/user0_sx0jq9@inc4 | ssh user3853@localhost zfs recv -F rpool/USERDATA/user3853_2bv9ey/snapnomount
List all Snapshots including received unmounted ones.
zfs list -t snapshot
Datasets will show mountpoints but will not be mounted.
Shows actual mounted Datasets and mount points.
-r flag to recursively list all Datasets on
zfs list -r rpool/USERDATA/user3853_2bv9ey
sudo zfs recv to mount the cloned Dataset with proper permissions.
zfs send rpool/USERDATA/user3853_2bv9ey/snapreceive@nomount | ssh firstname.lastname@example.org sudo zfs recv zroot/usr/home/extra/received
Send Snapshot, don't mount, and change the name of Snapshot at receiving Machine to
zfs send rpool/USERDATA/user3853_2bv9ey/snapreceive@nomount | ssh email@example.com sudo zfs recv -u zroot/usr/home/extra/unmouted@new
Users have permissions to receive Snapshots, but Snapshots will not be mounted.
Users don't have permission to mount.
Users do not have permission to promote Snapshots to Clones as that would require permissions to mount Datasets.
There is no limit to how many Snapshots you can take but they do take up space, so they are limited by Quota.