ZFS dataset restoring

restorezfs

I have suddenly removed my ZFS dataset from ZFS pool.
I do this from GUI of Nas4Free. In logs it was command something like "ZFS destroy Main/Video". Then i recreate dataset with same name (Main/Video) and now all data, which was in this dataset is gone.
Is it possible to restore information from deleted dataset or dataset itself? I have set up daily snapshots, but, as i understand, they are stored inside dataset, so i cannot access them without restoring it's dataset.

Best Answer

Depending on how long was you pool kept online after the mistake and also how busy was the pool during this period, it might be possible to rollback it to a previous transaction group (i.e. use an older uberblock) where the file system was still present.

Here is a script that takes that approach:

http://www.solarisinternals.com/wiki/index.php/ZFS_forensics_scrollback_script

You should work on a copy of your disk(s) as the recovery attempt is destructive.

Related Question