I'm running 14.3-STABLE.
I recursively deleted /var/cache and wanted to zfs-rollback(8) the zroot/var dataset to recover it. That didn't work, so I had to copy it back from the snapshot directory:
Am I misunderstanding how a rollback is supposed to work? Any input would be appreciated. Thank you.
I recursively deleted /var/cache and wanted to zfs-rollback(8) the zroot/var dataset to recover it. That didn't work, so I had to copy it back from the snapshot directory:
Code:
# zfs list -t snapshot -r zroot/var
NAME USED AVAIL REFER MOUNTPOINT
zroot/var@143-all-epoch 0B - 96K -
zroot/var@143-all-x11 0B - 96K -
zroot/var/audit@143-all-epoch 0B - 96K -
zroot/var/audit@143-all-x11 0B - 96K -
zroot/var/crash@143-all-epoch 0B - 96K -
zroot/var/crash@143-all-x11 0B - 96K -
zroot/var/log@143-all-epoch 116K - 164K -
zroot/var/log@143-all-x11 124K - 236K -
zroot/var/mail@143-all-epoch 72K - 104K -
zroot/var/mail@143-all-x11 0B - 160K -
zroot/var/tmp@143-all-epoch 64K - 96K -
zroot/var/tmp@143-all-x11 8K - 96K -
# rm -f -r /var/cache
# ls -al /var/cache
ls: /var/cache: No such file or directory
# zfs rollback zroot/var@143-all-x11
# ls -al /var/cache
ls: /var/cache: No such file or directory
# cp -R /.zfs/snapshot/143-all-x11/var/cache /var
# ls -al /var/cache
total 195
drwxr-xr-x 5 root wheel 5 Nov 3 23:03 .
drwxr-xr-x 26 root wheel 26 Nov 3 23:03 ..
drwxr-x--- 3 root wheel 3 Nov 3 23:03 cups
drwxr-xr-t 2 root wheel 2 Nov 3 23:03 gdm
drwxr-xr-x 2 root wheel 1514 Nov 3 23:03 pkg