Clone/copy/backup/renew USB boot drive

Status
Not open for further replies.

AlexF

Dabbler
Joined
Sep 12, 2011
Messages
16
Hi all,
I'm unable to find FAQ/Wiki/documentation to clone/backup USB boot drive.
According to Don't clone FreeNAS USB drives! I shouldn't clone using tools such as "USB Image Tool" , that's fine, got it.
However, the proposed procedure in that thread, specifically, "Create a new drive" "Boot it up, copy the files to it" doesn't make sense to me.
It's frustrating that a basic requirement doesn't have a proven solution. If it's so easy, can someone write a set of bash commands I can execute for achieving this task?
Otherwise, if it's such a common topic, wouldn't it make sense for developers of FreeNAS to include a button to execute - "Clone Boot USB to another" option in GUI and be done with it?
R's, Alex
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
What on Earth do you hope to accomplish?

Here's a handy guide to recovering from a failed boot device:
  1. Have a backup of the config file (which, whaddya know, the GUI has a button for)
  2. Install the same or newer version of FreeNAS to new media
  3. Upload the config file
 

AlexF

Dabbler
Joined
Sep 12, 2011
Messages
16
> What on Earth do you hope to accomplish?

on Earth, I hope to accomplish a lot, however, in reference to above, "Clone Boot USB to another"? Perhaps, not clear enough - make a backup of the image of the USB Boot disk in order to clone it to another USB disk should former fail in future.
 
Last edited:

nojohnny101

Wizard
Joined
Dec 3, 2015
Messages
1,478
@AlexF you have to realize that the people on here, specifically the people who usually answer the forum regularly, are very knowledgeable and have been with FreeNAS longer than you or I care to find out. I suggest you approach future question you post and answer that provided with a bit more humility. It will get you more help on here at the very least.

I can say this because from your question and subsequent response, you clearly don't understand the topic you are asking about (FreeNAS boot device). There would be no benefit to
make a backup of the image of the USB boot disk
because all the information that you lose when a boot device goes bad for whatever reason (software or hardware failure) is the information contained in the config file. And as @Ericloewe said, this should be backed up to any location other than the boot device (which is an option in the GUI).

The only reason relevance "cloning" has in all of this is for the people that can not have any downtime, so they clone their boot device and when one dies, the system can still boot and function, but in a degraded state. Replace the defective boot device and your good again.

Read up on the manual.
 

gpsguy

Active Member
Joined
Jan 22, 2012
Messages
4,472
You can use the webGUI to add a mirror to your boot device. Instructions are in the manual.

After doing so, you could run some CLI commands to split the mirror.

But seriously what Ericloewe suggested is easy and recommended.

If you still want to go your route, search the forum for a recent thread by Tweetybird - not sure if the name is right. IIRC, he was trying to use Clonezilla. He said he found a solution, but didn't elaborate.


Sent from my iPhone using Tapatalk
 

AlexF

Dabbler
Joined
Sep 12, 2011
Messages
16
Thanks for response, nojohnny101.

> because all the information that you lose when a boot device goes bad for whatever reason (software or hardware failure) is the information contained in the config file.

I haven't mentioned anything about config file because that's a separate issue. (Beyond context of this thread, I make config backups after changes or updates.)

> The only reason relevance "cloning" has in all of this is for the people that can not have any downtime,

or... as in my case, FreeNAS device is running headless and it's extremely inconvenient to attach it to monitor.

In this case, a known configuration from an old cloned USB boot disk would be sufficient to bring up FreeNAS and then have a recent config uploaded to it.

My issue in this thread is only to do with cloning of the USB boot disk to another.
 
Last edited:

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
Perhaps, not clear enough
Very clear and also misguided. The approach you want to follow is nonsensical.
If you want availability, mirror the boot device.
 

ethereal

Guru
Joined
Sep 10, 2012
Messages
762
@AlexF >The only reason relevance "cloning" has in all of this is for the people that can not have any downtime,

in that case i would recommend moving from usb to ssd
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
You can mirror the usb in the gui for fault tolerance and you can backup the config for disaster recovery. That should cover all your use cases. Feel free to use dd or something to image your usb stick but who know if it will work
 

INCSlayer

Contributor
Joined
Apr 4, 2015
Messages
197
I dont really understand the point of cloning the boot device.
I mean either its important that you dont have any downtime and you would mirror your boot device so that the only thing that happens when one fails is you get a message and you can replace it without affecting the system.
Or if that isnt something you need (even if it is very convenient) then aslong as you have a up to date version of your config and a usb stick to install freenas on just get the same version of freenas installed on the stick and import the config and it will again be working fine.
these are 2 working solutions i just dont understand why you need a third one?
 

AlexF

Dabbler
Joined
Sep 12, 2011
Messages
16
all, thanks for replying.

> a usb stick to install freenas on just get the same version of freenas installed on the stick and import the config and it will again be working fine.

Precisely, this is what I want. However, the USB drive must have have sufficient and relevant config for the headless FreeNAS device - at the very least site-specific LAG configuration, and own, gateways and DNS servers addresses, plus some other basics like local users and groups and their passwords and permissions.

The (remote office's) non-technical personnel can swap the USB drive and power-up, then, once up, then most recent config can be remotely uploaded (from head office) to the FreeNAS device.

To those offering their own alternatives or own preferences, thank you, but in this thread, I am only asking about cloning the USB boot disk.
 
Last edited:

ethereal

Guru
Joined
Sep 10, 2012
Messages
762
sweetandlow has already answered you
 

ethereal

Guru
Joined
Sep 10, 2012
Messages
762

INCSlayer

Contributor
Joined
Apr 4, 2015
Messages
197
all, thanks for replying.

> a usb stick to install freenas on just get the same version of freenas installed on the stick and import the config and it will again be working fine.

Precisely, this is what I want. However, the USB drive must have have sufficient and relevant config for the headless FreeNAS device - at the very least site-specific LAG configuration, and own, gateways and DNS servers addresses, plus some other basics like local users and groups and their passwords and permissions.

The (remote office's) non-technical personnel can swap the USB drive and power-up, then, once up, then most recent config can be remotely uploaded (from head office) to the FreeNAS device.

To those offering their own alternatives or own preferences, thank you, but in this thread, I am only asking about cloning the USB boot disk.


But you can do that with a mirrored device the only difference is that the machine does not have to be taken offline which it in the way you want to do it you have todo. When running them mirrored the machine will send out a message when one of the devices fail but keep working fine so you can send out someone to simply remove the broken one and put in a working one and then the head office can tell the system use the new one instead and it will resilver as it should. running it this way means that you always have a up to date version whereas the cloned copy would need to be periodically reinserted and recloned any time a change has occured or it would be out of date. you are creating more work for yourself than you need to.

This will probably be my last input in the thread and if you still want to clone it you can do so I'm just trying to understand why you are so adamant about cloning it instead of mirroring it when the situation you are describing would be perfectly solved with a mirrored boot device
 

ethereal

Guru
Joined
Sep 10, 2012
Messages
762
i'm sure twittyflash will help you if you pm him. i'm sure you'll win him over with your sophisticated brand of charm.
 

gpsguy

Active Member
Joined
Jan 22, 2012
Messages
4,472
Since your server is in a remote office with non technical people, I would change out the flash drives and boot from a pair of mirrored SSD's.


Sent from my iPhone using Tapatalk
 

ethereal

Guru
Joined
Sep 10, 2012
Messages
762
Status
Not open for further replies.
Top