How to recover and upload a config file from an imported pool?

Joined
Oct 22, 2019
Messages
3,641
So now that it's all done, do I need to go back and um....un-mount that directory?
If you already uploaded the config, and TrueNAS rebooted, you should be back in business automatically. No need to mount or unmount anything.

I was just mentioning the above caveat for future reference / future readers.
 

DirtyRat

Cadet
Joined
Mar 23, 2024
Messages
1
Evening @Redcoat , @winnielinnie, @sretalla, @Patrick M. Hausen and anyone else who has been anxiously awaiting the resolution of this mind blowing adventure:

After a fair amount of fiddling and the realization that it would probably have been faster to just re-install everything, I managed to recover and upload the old config file by combining different pieces of all the advice that you folks provided. In the hopes of helping out anyone with a similar issue I've outlined the basic process I used below. If you are reading this and need some more details feel free to drop me a line.

Just as a quick recap - Running TrueNAS Scale, Boot SSD Died, I am bad at backups, the goal was to recover an old config file from the existing storage pool so I didn't have to set everything up again on the new install.


Step 1 - get a new SSD and install a shiny new copy of TrueNAS Scale (I am on a private network, so set it up as Root User)

Step 2 - Import existing pool

Step 3 - See if the config files are actually somewhere in the pool by going into shell and using the code:
Code:
zfs list
- If it is there, it will look something like this: tank/.system/configs-76c11d7f8a944b3d8e42fe35420dbaa3 16.3M 344G 16.3M legacy (if there are a couple, pick the one with the bigger file size)

Step 4 - If it looks like the file is there, Install WinSCP on whatever computer you are using to access your TrueNAS server ( I'm assuming you are using the web interface), and configure it to connect to your TruenNAS machine via SCP. There's lots of info on how to do this, so I won't go into it here, but i connected as the user 'root' to make sure I had access to everything. Once it's all set up, close WinSCP for now.

Step 5 - Back in Shell, use the code
Code:
mount -t zfs tank/.system/configs-76c11d7f8a944b3d8e42fe35420dbaa3 /mnt
to mount the config directory - be sure to change the path to whatever yours is.

Step 6 - Once that directory has been mounted, head back into WinSCP and connect to your TrueNAS machine.

Step 7 - Navigate to /mnt and you should see two folders, one being the current version of scale you are running, and the other being the older version that you were using when your boot drive died. Pick the older one.

Step 8 - Feast your eyes on all the delightful backed up config files that TrueNAS quietly made because it knew one day it would have to save you from yourself.

Step 9 - Download the most recent one ( for me it was at the bottom) to your computer (not the one running TrueNAS, that would be silly, the one you are using to run winSCP

Step 10 - Back in Scale, go to system setting --> General --> then in the upper right hand corner of the screen click Manage Configuration, upload config file.

Then you just navigate to wherever you saved the file on your computer, click it, and voila! Things will happen. TruNAS will restart, settings will change, apps will download (This could take some time depending on how much stuff you have running) and all will be right in the world.

Thanks so much to all the folks listed above, they gave me all the pieces I needed to get this sorted . If nothing else this has been a great learning experience for me, and hopefully laying it all out helps someone else.

Have a great night.

M.
I just created a TrueNAS forum account with the sole purpose of thanking you for this wonderful write-up @Pmikeyreid. A similar thanks to those involved in helping you to reach your resolution. I was able to restore my TrueNAS config from my storage pool after my boot drive was corrupted using your instructions. Very helpful indeed!
 
Top