Deleted one jail - FreeNAS deleted all clones - I need those...

potatosword

Dabbler
Joined
Dec 30, 2018
Messages
44
So I went to delete one of my jails thinking I had several cloned copies of it that I could use as backups and after several moments much to my horror all of the clones and the original have been deleted by the gui. I'm kind of panicking because there's about two years of work contained in there.

It looks like all the snapshots associated with those jails were also deleted? All I have are pool/iocage snapshots and various other sub-snapshots. Am I safe to restore the latest pool/iocage snapshot and will that give me my jails back...?
 

potatosword

Dabbler
Joined
Dec 30, 2018
Messages
44
pool/iocage/jails snapshot has the folder structure that contains the original jails but is 0 bytes and the folders are empty.
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
How did you delete the jail? Via CLI or from the GUI?
 

potatosword

Dabbler
Joined
Dec 30, 2018
Messages
44
I was in the GUI. Once the pop-up window went away my jail and all its clones were gone. Clones were created in command line over the past year.
 
Last edited:

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
Unfortunately, clones use the parent jail as the template. Deleting an iocage jail, as you've discovered, also deletes all snapshots, and all jails created from that parent template. The snapshots at the pool/iocage level don't contain the snapshots of the jails themselves, as the jails are separate ZFS datasets, and so are the root directories of the jails.

Your only recourse is ZFS recovery software, like Klennet. Going forward, please take this lesson that snapshots and clones aren't a valid backup strategy. If you had replicated the snapshots off-box, you could've used these to reconstitute. Even iocage export, which creates a TAR image which could be copied off-box would've worked as input for later iocage import to rebuild your jails.
 

potatosword

Dabbler
Joined
Dec 30, 2018
Messages
44
Well good to know that deleting the original jail deletes all the clones. Wish the GUI would have said something to that effect.

Is this Klennet software going to get along with my encrypted pool? Is there risk of losing everything else digging for this lost jail?
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
Klennet can deal with GELI-encrypted pools. The Klennet developers recommend working off dd images of your drives in a separate Windows system, instead of working on the drives directly.
 

potatosword

Dabbler
Joined
Dec 30, 2018
Messages
44
Good news actually. I remembered that I had moved nearly all of my custom scripts to a different dataset so I could set up a SAMBA share and edit more easily. Looks like I'll only have to limp through getting packages set up again rather than losing all of my work.
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
Great!
 
Top