4 ms·
Week ago my client lost data on ZFS by accidentaly deleting folder. Unfortunately the data was created and deleted in the meantime between two snapshots. One wo
by harvie 4y ago
Week ago my client lost data on ZFS by accidentaly deleting folder. Unfortunately the data was created and deleted in the meantime between two snapshots. One would expect that it still might be possible to recover, because ZFS is CoW.
There are some solutions like photorec (which now has ZFS support), but it expects you can identify the file by footprint of its contents, which was not the case. Also many of these solutions would require ZFS to go offline for forensic analysis and that was also not possible because lots of other clients were using the same pool at the time.
So this had failed me and i really wished at the time that ZFS had continuous snapshots.
BTW on ZFS i use ZnapZend. It's second best thing after continuous snapshots:
https://www.znapzend.org/ https://www.znapzend.org/
https://github.com/oetiker/znapzend/ https://github.com/oetiker/znapzend/
There are also some ZFS snapshotting daemons in Debian, but this is much more elegant and flexible.
But since znapzend is userspace daemon (as are all ZFS snapshoters) you need some kind of monitoring and warning mechanism for cases something goes wrong and it can't longer create snapshots (crashes, gets killed by OOM or something...). In NILFS2 every write/delete is snapshot, so you are basicaly guaranteed by kernel to have everything snapshoted without having to watch it.