Reinstall after failing boot partition, how to recover settings from the old boot device?

Svenkk4

Dabbler
Joined
Jul 4, 2014
Messages
20
Hi,
after a power outage a few days ago the boot partition on my truenas boot device was not working anymore (the problem probably occoured long before but as the never went down for month i did not noticed it). Anyway, i reinstalled truenas on a new device and imported my storage pool and to my surprise the jails where detected automaticaly which is realy nice because i feared i had to invest many hours to reinstall everything and try to recover the configuration some how.

But apart from that, i of course lost all my truenas settings especially all my shares (with pretty fine grained rights and permissions and such), luckily i was able to (or better am currently trying to do) add the old boot pool and should be able to access most of the data on it. This should include the configuration of the shares. But i do not know where to look. Can someone help me with that?
 

Redcoat

MVP
Joined
Feb 18, 2014
Messages
2,925
Your config file is at /data/freenas-v1.db

And if the boot media happens to be corrupt, it's also on your pool at /var/db/system/configs<a very large number> from the autosave at 03h45 every morning (unless your system files have been moved back to the boot media from the first-created pool). Look for the file with the date of the morning of your power failure.
 

Svenkk4

Dabbler
Joined
Jul 4, 2014
Messages
20
My boot pool where two mirrored usb drives (i use a m.2 ssd now) and i was not able to access it (got a degraded pool at first and i am now trying to access the drives each by itself). In /var/db/system/ are two config- files on has a "TrueNAS-13.0-U4" directory containing only 20230518.db which probably is the current config, the other is empty sadly.
 

Svenkk4

Dabbler
Joined
Jul 4, 2014
Messages
20
nevermind, on the data pool was another .system directory and there the are all those db files you mentioned. But how do i proceed from here? Do i have to import it as whole or is there a way to selectively import or just read the file and extract what i need manually?
 

Redcoat

MVP
Joined
Feb 18, 2014
Messages
2,925
Find the
20230518.db
Yes, that's the current config.
You say you have other db files - you'll have to identify the appropriate config file - rename if to freenas-v1.db and copy it to /data
 

Svenkk4

Dabbler
Joined
Jul 4, 2014
Messages
20
I was not able to extract the information I wanted from the older configs, so i went ahead and just recreated the config from my memory. It was a bit tedious but worked in the end.
 
Top