Disaster Recovery Process - single server

JmarcSyd

Dabbler
Joined
Oct 28, 2022
Messages
15
Hi all,

I have TrueNAS scale running happily on a simple PC with one SSD boot drive and two SATA SSDs mirrored in RAID1.
I am just wondering what is the process to recover in case of catastrophic hardware failure.

Assume the following for example:
  • Motherboard and boot drive are both dead but the two SATA SSDs are functional.
  • I do have a recent backup of the configuration.
  • The user data itself is backed up to Onedrive but it would take hours to bring it back from the cloud.
I can get another PC with a new boot drive and easily reinstall TrueNAS from scratch.

BUT how do I recover my mirrored VDEV from my two SATA SSDs? And my existing configuration?

Is there a guide available to recover a failed TrueNAS server?

Thanks heaps!

JM
 

NugentS

MVP
Joined
Apr 16, 2020
Messages
2,947
Just re-install TrueNAS and upload the config using the menu optiojn. The pool will automatically import
 

Whattteva

Wizard
Joined
Mar 5, 2013
Messages
1,824
There's nothing complicated about it really. Recovering is as simple as:

If you have config file backed up:
  1. Reinstall TrueNAS on new boot drive.
  2. Upload config file.
  3. Reboot.
  4. Profit.
If you don't have the config file backed up:
  1. Reinstall TrueNAS on new boot drive.
  2. Import existing pool.
  3. Reconfigure your previous setup (ie. users, services etc.) from scratch (may take a while depending on how complex your previous setup was).
  4. Profit.
Note, you may be able to recover your previous config file from either your old boot drive at /data/freenas-v1.db or from the pool at /var/db/system. There will be a bunch of db files in there. Just get the latest one. You can get a list of it with this command
Code:
find /var/db/system/ -type f -regex ".*2023.*\.db$"


Obviously, the latest one will be 20230518.db if you were to look at it today.
 

JmarcSyd

Dabbler
Joined
Oct 28, 2022
Messages
15
Thanks all. It looks simple indeed.
I'm going to run a simulation on a virtualized TrueNAS to fully understand how this works.

EDIT: I shut down my test TrueNAS VM on my ESXi server, created a new VM with a blank boot drive, connected the existing virtual disks containing the RAID1 VDEV from the test VM, installed TrueNAS from ISO image, restored the config file and everything is fully functional!

I'm very impressed that it was so easy and the mirrored VDEV was up and running straight away. :smile:
 
Last edited:

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,700
connected the existing virtual disks containing the RAID1 VDEV from the test VM
Just be aware that you're currently playing with a config that will lose your data.

Please read this before continuing with important data on that system:
 

JmarcSyd

Dabbler
Joined
Oct 28, 2022
Messages
15
Just be aware that you're currently playing with a config that will lose your data.

Please read this before continuing with important data on that system:
Thanks but that was just a test system with no real data to understand how to recover a failed machine. Although I'm a little tempted to test Raw Device Mapping on a spare SATA drive now :smile:
 

Whattteva

Wizard
Joined
Mar 5, 2013
Messages
1,824
Thanks but that was just a test system with no real data to understand how to recover a failed machine. Although I'm a little tempted to test Raw Device Mapping on a spare SATA drive now :smile:
Oh boy, not the RDM!

CC: @jgreco is going to have nightmares from a decade ago.
 
Top