Backup usb?

Status
Not open for further replies.

fracai

Guru
Joined
Aug 22, 2012
Messages
1,212
The only thing you really need to backup is the FreeNAS database file, which is located at: /data/freenas-v1.db

If you search, there are a few threads on backing up the file nightly or whenever it changes.
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
The only thing you really need to backup is the FreeNAS database file, which is located at: /data/freenas-v1.db

If you search, there are a few threads on backing up the file nightly or whenever it changes.

Unless you're using encryption - if that is the case, please read the manual's section on encryption.
 

IanWorthington

Contributor
Joined
Sep 13, 2013
Messages
144
Thanks for that. What I was wanting to do though was to duplicate the usb stick prior to upgrading do I've something to fall back to if it all goes pear-shaped. Is there a recommendation for that?

i
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
Thanks for that. What I was wanting to do though was to duplicate the usb stick prior to upgrading do I've something to fall back to if it all goes pear-shaped. Is there a recommendation for that?

i

The easiest solution is to install the desired version to a clean drive. All versions can be found at download.freenas.org .

If you're upgrading, it's easier to install the new version on the clean drive and upload your configuration to it, keeping the old one in case something goes wrong.
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
...and to directly answer your question: no, there isn't a way to directly back up the USB stick. Using dd to make an image of its contents should work in theory, but in practice it seems not to.
 

IanWorthington

Contributor
Joined
Sep 13, 2013
Messages
144
The easiest solution is to install the desired version to a clean drive. All versions can be found at download.freenas.org .

If you're upgrading, it's easier to install the new version on the clean drive and upload your configuration to it, keeping the old one in case something goes wrong.

Doesn't the config file need up changes for a new version?

...and to directly answer your question: no, there isn't a way to directly back up the USB stick. Using dd to make an image of its contents should work in theory, but in practice it seems not to.

Thanks.
 

Knowltey

Patron
Joined
Jul 21, 2013
Messages
430
Best option is to use the backup option for the co figs in the interface and then just keep a spare USB handy that has the FreeNAS image on it already. Then in the event that for whatever reason the USB stick fails you stick the new one in boot and then upload the config and you should be back up within ten minutes or so.
 

IanWorthington

Contributor
Joined
Sep 13, 2013
Messages
144
Thanks. I remain confused about versions though. Does the config file need to be from the same version as the image or will it be automatically upgraded if required?
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
It will automatically upgrade. What you can't do is try to downgrade (for example, take a config file from 9.2.1.6 and try to use it on 9.2.0).
 

Metalcraft

Dabbler
Joined
May 17, 2014
Messages
19
FYI. You can use clonezilla to clone your flash drive to another one. Not really a backup of your configuration but it is good to know. I am happy I have clone it to another flash drive since I always mess with my configurations too much to the point I break something and I have to completely reinstall freenas. I don't waste time doign a reinstall when I got a clone.
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
FYI. You can use clonezilla to clone your flash drive to another one. Not really a backup of your configuration but it is good to know. I am happy I have clone it to another flash drive since I always mess with my configurations too much to the point I break something and I have to completely reinstall freenas. I don't waste time doign a reinstall when I got a clone.

That's known not to always work for seemingly inexplicable reasons. It is not a substitute for a backed-up config.
 

diskdiddler

Wizard
Joined
Jul 9, 2014
Messages
2,377
Can someone explain to me how this works?
If I backup my FreeNAS config (system, settings, general, save config) it prompts me to save the .DB file.

Since my jails are on my actual disk array, if I were to backup that .db file. Throw away my USB key, re-create a 9.2.1.6 key, then I can import (upload) the config and then re-find my array, right? Losing virtually nothing?

My data (believe it or not) is more expendable than my time in configuring the key, the critical data on the system itself is actually backed up.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
Can someone explain to me how this works?
If I backup my FreeNAS config (system, settings, general, save config) it prompts me to save the .DB file.

Since my jails are on my actual disk array, if I were to backup that .db file. Throw away my USB key, re-create a 9.2.1.6 key, then I can import (upload) the config and then re-find my array, right? Losing virtually nothing?

That is 100% correct!
 

diskdiddler

Wizard
Joined
Jul 9, 2014
Messages
2,377
So the "virtual MAC" address, jail name, jail scope (IP range) - etc all gets pulled in
One last thing, do you put your new USB in, import the .DB file (upload) and THEN suck the disks in with a "find zpool" thingo OR do you import the disks first, then import the DB (or it doesn't matter?)

I'll have to remember to write out a backup every week or two.
 

Knowltey

Patron
Joined
Jul 21, 2013
Messages
430
For me the pools appear after restoring the config.
 

diskdiddler

Wizard
Joined
Jul 9, 2014
Messages
2,377
Ok so for unforseen reasons, I'm going to do one of these restores, today........... I'm moving from one server to another (same make slightly newer model, HP Microserver N54L instead of my old N40L)
I'm going to make a new FreeNAS USB stick, same version, 9.2.1.6


Can I just clarify, do I plug the disks in, import the zpool thing, THEN import the backup config file?
or do I boot up the new USB stick, import the backup config file, then plug the disks in?

This is gonna be interesting, good test.
 

diskdiddler

Wizard
Joined
Jul 9, 2014
Messages
2,377
Ok I took a gamble and just straight swapped existing USB stick into new PC - only diff is new motherboard (same model, faster CPU) - obviously a new MAC address but I made sure disks were definitely plugged into the same SATA ports - worked fine.
Not a "proper" restore but it was worth a shot and worked.
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
Ok I took a gamble and just straight swapped existing USB stick into new PC - only diff is new motherboard (same model, faster CPU) - obviously a new MAC address but I made sure disks were definitely plugged into the same SATA ports - worked fine.
Not a "proper" restore but it was worth a shot and worked.

You can move the disks around all you want, it won't make a difference which port or which controller they're one (unless you're using RAID controllers...).
 
Status
Not open for further replies.
Top