3

I have to work on server with ZFS file system to recover deleted file names or recover actual files. I have very basic knowledge about ZFS and couldn't find easy way to achieve this. I just wonder if there are tools that do this or even just just zfs commands that could help.

1 Answer 1

0

It depends on if snapshots are enabled (and have been created) for the ZFS file system in question. You can list them with zfs list -r -t snapshot yourPool/intermediateFs/yourFs (recursively, snapshots only).

  • If you have usable snapshots, you can browse the contents by ls /yourPool/intermediateFs/yourFs/.zfs/snapshot/snapshotName and copy the data from there (read-only).

  • If you do not have snapshots, it is more difficult: There is zdb, the ZFS debugger, but it is not that useful if you don't know what you want to do exactly. A good tutorial to start would be this blog post.

In either case, I would strongly suggest enabling snapshots and also regular backup of all filesystems you cannot afford to lose. Backup with snapshots and zfs send/recv is much easier/faster than on other filesystems, but the work to really recover files without any backup is harder and costs more time than on simple file systems.

2
  • 1
    Thanks, unfortunately I don't have snapshots. I'm aware of this topic but it's too technical for me and I don't have time to understand ZFS internals now. I was looking for easier solutions like recovery tools on other file systems. I found Ufsexplorer but it has no support for ZFS raid-z , only one disk which is almost useless.
    – Mariam S
    May 31, 2016 at 12:08
  • In this case I would contact the company/individual listed on this blog for a quote on what it would cost to rescue your data. Unfortunately I know of no ready-to-use recovery tools - probably for reasons outlined in the article. In any case, I wish you best of luck!
    – user121391
    May 31, 2016 at 14:43

Not the answer you're looking for? Browse other questions tagged .