# ZFS data recovery after diff screwup



## librepensee (Sep 18, 2014)

Dear All,

Laptop, HDD 500G, 2 approx equal size slices, each v9.1 installs /w encrypted zfs, first slice zpool ´tank´, second ´tank0´. After bad crash (zfs swap full) on first system no longer access to first slice (tank).

Finally, after many months of trying, I managed to successfully get access to tank and import the zpool into the second working system on second slice.

```
zpool import -o altroot=/zpool_import tank
```
Victory, Great! Me very happy camper. To secure things I tried making the imported zpool read only but did not succeed. The zfs manuals are often too cryptical for me to understand/know where or how to configure that kind of matters.

Then I started copying zpool_import/usr/home to /home on an external HD. Over 200G and according to the system this was going to take 12 hours so unfortunately  I quit that to get some sleep. This morning  wanted to do that copy using kdiff. Now I don't know what exactly went wrong but my guess is that the empty /home directory on the external HD got synchronized to the imported zpool completely emptying that /usr/home directory. I immediately searched the web for file recovery on zfs but have not been able to find anything useful (to me). 

If I remember well there is the possibility with zfs to recover but I'm truly scared s*****ss to make another bad manipulation and make matters worse. Now I please all you gurus and lesser gods to give me some hope and possibly some useful hints on how to recover my data, it's really important because there's 3 years of project files in there of which (of course!) only part are backed up somewhere (now pulling out my hairs for a second time).

Thanks in advance!
JH

P.S. I see now that the system is accessing /var on the imported zpool, how could I avoid it doing that?


----------

