Disaster after accidentally running apt-get upgrade

a575606

Cadet
Joined
Jun 24, 2021
Messages
4
Hi everyone. I have spent a couple weeks setting up my first TrueNAS home server and was finally getting everything working when I had a bit of a disaster. I'm really hoping someone can help, as it's really been a huge amount of work.

Basically, to make a long story short, I was trying to build a docker image and one of the commands in the Docker file included running an apt-get update && apt-get upgrade -y. I was getting an error at that step and so I ran the command manually, not thinking about the fact that I was running the update outside of the scope of the container. It was not until I saw various truenas components being upgraded that I realized the mistake.

I tried rebooting but all is not well with my installation. My network adapters aren't detected (4 x 1Gb in 802.3ad link), nor are my data pools (6 x 4tb z1 with 128 gb ssd cache and 1 x 4tb single drive stripe). I can get to the cli, but with no networking nor access to data, it's not so helpful. It does find my boot pool however, a 128 gb ssd.

My idea is to unplug the data drives and reboot on a usb install disk and reinstall TrueNAS, then reboot with my drives plugged in, hoping they'll be picked up. However, before doing anything I wanted to know if:

a) is there any way to save the config settings, users, etc? and

b) do I have the right idea, or is there another way to rescue things I haven't thought of?

Any help would really be appreciated. Thanks!
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
a) is there any way to save the config settings, users, etc? and
It's in /data

b) do I have the right idea, or is there another way to rescue things I haven't thought of?
It's an appliance, so you're certainly on the right track, just rebuild and restore config (and as long as you're not too far off-piste with your "custom" config, all will be fine).
 

a575606

Cadet
Joined
Jun 24, 2021
Messages
4
Hi sretalla, thanks for your help, it's much appreciated.

So, the saga continues... I managed to install truenas on an external drive and was able to import my data pools without incident, so that was a relief. However I wasn't able to import the old boot-pool via the gui or the cli... that's perhaps due to my inexperience with zfs, but it didn't seem easy to access the old /data directory from a different install. I then tried to run an upgrade install on the original boot drive, which failed, but I was able to grab the 'data_preserved' dir from the failed upgrade, which included /data and a couple files in other directories.

The question now is, can I do a clean install and overwrite the files from /data and reboot? Or is there a better way to import the old settings?

And, is there a way to export settings in future so I can back them up, or is backing up the /data directory sufficient?
 
Top