SOLVED Accidentally deleted dataset, any way to recover?

Status
Not open for further replies.

Baptiste

Explorer
Joined
Jun 10, 2016
Messages
67
Long story short, I have a single 750GB HDD I used as a Time Machine back up running FreeNAS 9.0. I wiped my Mac laptop, reinstalled the stuff I wanted from the TM backup and wiped the TM backup for a new fresh start. I wiped the TM backup by destroying the dataset for it and creating a new one. Only after making the new dataset did I realize I needed Application Support files I forgot to copy over, DERP.

Where I am in the recovery process.
So it seems there is a SLIM chances to undo a dataset destroy by referring to the TXG number that corresponds to before the destroyed dataset. The command I got it down to was:

sudo zpool import -o -D -f -T 636060 2629130050503020750

However, this leads to this issue I can't seem to solve:
"zpool one or more devices is currently unavailable"

I've tried to run the command box on the FreeNAS box itself and on my Mac running OpenZFS.

* I HAVE A BACK UP OF THIS DATA, I DID GET THE DATA BACK VIA THE SPARE BACK UP. I AM JUST ASKING IN CASE IN THE FUTURE IF I DON'T HAVE A BACK UP OR IF ANYONE ELSE HAS THIS ISSUE AND COMES ACROSS THIS THREAD *
 
Last edited by a moderator:
Joined
Feb 2, 2016
Messages
574
That's a tough one. Thankfully you have a solid backup.

I don't have any experience with a FreeNAS version that old. I've seen some threads on last-ditch recovery but my take-away from them is to have a solid backup because no data I own is worth enough to jump through all the hoops necessary to ATTEMPT (no guarantees) recovery from that sort of destruction.

Cheers,
Matt
 

Arwen

MVP
Joined
May 17, 2014
Messages
3,611
The OpenZFS people are working on something that may help with this issue in the future. Its called Pool Checkpointing, or somethng like that.

It's like snapshotting, but for the whole pool. It allows you to go back in time for the entire pool. Including dataset destroy recovery. There is only one checkpoint, so I'd think that the FreeNAS people might use it in the GUI by giving the user an option to really destroy, or destroy later, (maybe a day later ia cron...).
 

Baptiste

Explorer
Joined
Jun 10, 2016
Messages
67
That's a tough one. Thankfully you have a solid backup.

I don't have any experience with a FreeNAS version that old. I've seen some threads on last-ditch recovery but my take-away from them is to have a solid backup because no data I own is worth enough to jump through all the hoops necessary to ATTEMPT (no guarantees) recovery from that sort of destruction.

Cheers,
Matt


Sorry for taking so long to answer, company I worked for shut down and I've been in 'FIND A NEW JOB ASAP' mode since then.

I made a mistake on the FreeNAS version, it's actually FreeNAS-9.10.2-U2 (e1497f2). I don't know if this makes a difference or not.

There's a lot to be said for the 3-2-1 rule.
 

Baptiste

Explorer
Joined
Jun 10, 2016
Messages
67
The OpenZFS people are working on something that may help with this issue in the future. Its called Pool Checkpointing, or somethng like that.

It's like snapshotting, but for the whole pool. It allows you to go back in time for the entire pool. Including dataset destroy recovery. There is only one checkpoint, so I'd think that the FreeNAS people might use it in the GUI by giving the user an option to really destroy, or destroy later, (maybe a day later ia cron...).

Interesting, so it's like the TXG tags but built in recovery, and not just, small chance of recovery.

But seeing how this is a maybe future for FreeNAS, any idea about current TXG methods?

If not, I'll just consider it impossible at the moment.

Thanks both of you!
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
I'm pretty sure this isn't recoverable at all, at the moment. Theoretically, some of the damage may be recoverable using zdb if you're fast enough (deletes are asynchronous during normal operation, but must be fully completed before a pool is imported), but that's far too complicated for me.
 

Baptiste

Explorer
Joined
Jun 10, 2016
Messages
67
I'm pretty sure this isn't recoverable at all, at the moment. Theoretically, some of the damage may be recoverable using zdb if you're fast enough (deletes are asynchronous during normal operation, but must be fully completed before a pool is imported), but that's far too complicated for me.

Far too complicated for me as well I bet.

So if it isn't recoverable, what's the use of TXG tags?
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
As I understand it, to recover from bad writes (rare, but can happen in weird cases), since nothing has actually been deleted.
 

Baptiste

Explorer
Joined
Jun 10, 2016
Messages
67
As I understand it, to recover from bad writes (rare, but can happen in weird cases), since nothing has actually been deleted.

Gotcha, thank you for the info.
 
Status
Not open for further replies.
Top