Backup and Restore under the System -> Advanced menu; unclarity

Status
Not open for further replies.

Elo

Contributor
Joined
Mar 11, 2012
Messages
122
There is a (disaster) backup option under the tools -> advanced menu. My system is toasted (some files where overwritten due to a stupid mistake) and I have a backup created through the advanced menu where I did NOT mark the Backup the data box. (I have NO copy of the configuration generated from the system -> general -> save config menu as the disk holding this is faulty; really bad luck). In the manual it is stated:

Warning

the backup and restore options are meant for disaster recovery. If you restore a system, it will be returned to the point in time that the backup was created. If you select the option to save the data, any data created after the backup was made will be lost. If you donot select the option to save the data, the system will be recreated with the same ZFS layout, but with no data.


This is not clear and I want to be 100% sure before I apply the backup.Does this mean that the zfs volumes will contain NO data after a restore or simply that the data content is not changed so that any data added after the backup is applied?

I have reinstalled FreeNAS and got the pools online again. The problem is that the server is used for many purposes by several people and it is a big and difficult job to rebuild everything: Jails, Visualization, Cloud Application etc.

'I am hoping that when I apply the backup it restores everything and lets the data in the pools be untouched????
 
Last edited:

DaveF81

Explorer
Joined
Jan 28, 2014
Messages
56
Do you have a recent copy of your FreeNAS configuration? (File usually has the file name format: [servername]-FreeNAS-9.3-STABLE-[build]-[timestamp].db) If so, recovery is fairly easy. I had to recover my FreeNAS server only a few days ago due to a failed boot drive.

1. Re-install FreeNAS. Don't worry, this won't destroy your pool providing you don't write to any other drive than your boot drive.
2. Import your pool under Storage > Import volume.
3. Restore your FreeNAS configuration file under System > General > Upload config.

On the configuration upload, your FreeNAS server will reboot and if all goes well, you'll be back to normal.
 

Elo

Contributor
Joined
Mar 11, 2012
Messages
122
Thanks for your reply! (My posting was not clear so I have edited it)

No I only has a backup generated as explained. To do what you suggest requires that I have saved the configuration while the system was ok (System, -> genberal -> save config). I do this regularly but the saved configuration is corrupted for some reason (disk failure and really bad luck but shit happens). I have reinstalled the OS and have imported the Pools which are OK, but the configuration is not restored by this of course. So if I can use the backup without destroying the data in the pools that would be great. I just need to know that the data in the pools are not affected by this???
 

DaveF81

Explorer
Joined
Jan 28, 2014
Messages
56
Like you, if I'm reading the docs correctly, the restore function will overwrite everything. If you did not make the choice to save all data, it appears that the ZFS layout will be re-created with no data.

So, to answer your question, it appears that data will be wiped should you choose to do this.

Edit: Suggest you join #freenas on irc.freenode.net. Might be somebody in the IRC chatroom that can help better than I.
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
If you still have the original USB you can copy the configuration file off of it. But I suspect you used the same stick for your new installation, So it's gone for good. The disaster recovery option you are messing with doesn't have anything to do with the configuration file. It is just a way to backup your data to another box.
 

Elo

Contributor
Joined
Mar 11, 2012
Messages
122
Thank you again for answering! You are correct that I have reinstalled on the original USB so that option is gone.

You say the backup has nothing to do with the configuration. Then the documentation is completely misleading and I am utterly confused as it states:

Backup: used to backup the FreeNAS® configuration and ZFS layout, and, optionally, the data, to a remote system over an encrypted connection. Click this button to open the configuration screen shown in Figure 5.4b. Table 5.4b summarizes the configuration options. The only requirement for the remote system is that it has sufficient space to hold the backup and it is running an SSH server on port 22. The remote system does not have to be formatted with ZFS as the backup will be saved as a binary file. To restore a saved backup, use the “12) Restore from a backup” option of the FreeNAS® console menu shown in Figure 3a.

and

Backup data checkbox by default, the backup is very quick as only the configuration database and the ZFS pool and database layout are saved; check this box to also save the data (which may take some time, depending upon the size of the pool and speed of the network)

What configurations are then referred to in that text?

The pools are ok now with the reinstalled OS. So alternatively I can back up the data before using the backup. The problem with that is that it will take days since the server has 20 HDDs of 3T each.
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
The real solution for a backup is to backup the data by whatever means you prefer and also backup the config file. Always have a backup of the config file. You might have one in the .system dataset, too (search the forum for its precise location).

That backup function you used is a brute force approach with very limited appeal (IMO) and narrow use case.
 

Elo

Contributor
Joined
Mar 11, 2012
Messages
122
Thanks. I have however given up on this as I can not get to the bottom of what will be the exact result of applying the backup. Further my system refuses to use the backup file and claims there is no file in the given location. I am therefore installing everything from scratch and have already a ton of angry mails and have LEARNED A VALUABLE LESSON. I will attempt to automate the saving of the configuration (I have seen scripts in other threads in the forum)
 
Status
Not open for further replies.
Top