How to properly backup the boot USB and configuration?


Recommended Posts

Hi. I am pretty sure there are several ways to backup the USB boot drive and configuration. However, I cannot find a straight cut answer. This is the biggest issue still keeping me on the fence investing into purchasing unRAID. Booting from USB devices is in my experience a bad deal since they tend to crap out. 

 

I have now got to the point where I have my configuration pretty much like I want it. Now I need to make a backup of said USB, preferably to another USB created to replace the current one should it fail.

 

Also, question, if the USB drive fails, how do I transfer the license to the backup USB?

Link to comment
3 hours ago, NMGMarques said:

I have now got to the point where I have my configuration pretty much like I want it. Now I need to make a backup of said USB, preferably to another USB created to replace the current one should it fail.

So the easiest way is to use the CA Appdata Backup plugin.. it's got an option for the USB drive.

 

 

Or if for some reason you don't want to use that plugin, you can run a User Script (user scripts plugin :P) to backup your drive also.. I have mine going to a Dropbox share daily.


#!/bin/bash

/usr/bin/rsync -avXHg --delete /boot/ /mnt/user/Dropbox/unraid_BootUSB_Backup;
chmod 777 -R /mnt/user/Dropbox/unraid_BootUSB_Backup;

 

Either of these methods would keep your configuration up to date on a day by day basis.  There is also a Flash Backup button under the Main tab that gets you a backup file at the current point in time.

Link to comment
18 hours ago, Energen said:

So the easiest way is to use the CA Appdata Backup plugin.. it's got an option for the USB drive.

 

 

Or if for some reason you don't want to use that plugin, you can run a User Script (user scripts plugin :P) to backup your drive also.. I have mine going to a Dropbox share daily.

 


#!/bin/bash

/usr/bin/rsync -avXHg --delete /boot/ /mnt/user/Dropbox/unraid_BootUSB_Backup;
chmod 777 -R /mnt/user/Dropbox/unraid_BootUSB_Backup;

 

 

Either of these methods would keep your configuration up to date on a day by day basis.  There is also a Flash Backup button under the Main tab that gets you a backup file at the current point in time.

So if the current USB gives up the ghost, this will allow me to boot from another device without loss of data? And what about the registration? How does that get transfered?

Link to comment
4 hours ago, NMGMarques said:

So if the current USB gives up the ghost, this will allow me to boot from another device without loss of data? And what about the registration? How does that get transfered?

Unraid always requires that it be booted from a USB drive.  Making a backup of the current working USB drive will suffice to recover from a future USB failure. 

 

The easiest way to make this backup is  go to  Main  under the  Boot Device  section/tab, click on the blue 'Flash' listing under the 'Device' column.   Under the  Flash Device Settings   section/tab, you will find a "Flash Backup" button. 

 

You can find more details on the exact procedure for getting a new .key file for your new USB drive here:

 

       https://wiki.unraid.net/UnRAID_6/Changing_The_Flash_Device

 

LimeTech tries to make it very easy to get a replacement key.  If you have a proper backup of your Unraid boot drive, you can be up and running in a few minutes after a USB failure.     IF you should have a problem, you can always contact Customer Support.   That will take a bit longer but they have always been very accommodating to reasonable requests.  

Edited by Frank1940
  • Like 1
Link to comment
  • 2 weeks later...
On 8/1/2020 at 12:43 PM, Frank1940 said:

Unraid always requires that it be booted from a USB drive.  Making a backup of the current working USB drive will suffice to recover from a future USB failure. 

 

The easiest way to make this backup is  go to  Main  under the  Boot Device  section/tab, click on the blue 'Flash' listing under the 'Device' column.   Under the  Flash Device Settings   section/tab, you will find a "Flash Backup" button. 

 

You can find more details on the exact procedure for getting a new .key file for your new USB drive here:

 

       https://wiki.unraid.net/UnRAID_6/Changing_The_Flash_Device

 

LimeTech tries to make it very easy to get a replacement key.  If you have a proper backup of your Unraid boot drive, you can be up and running in a few minutes after a USB failure.     IF you should have a problem, you can always contact Customer Support.   That will take a bit longer but they have always been very accommodating to reasonable requests.  

Thanks for the reply.

 

Is there any way to automate the backup so it happens periodically? Right now, that function download the backup to my hard drive, and I would rather like it to backup to a spare USB connected to the unRAID machine itself. Also, does this backup my complete setup? Meaning, will this backup my dockers, configuration, etc? Or do I have to set up additional backup measures for this?

 

Basically, what would I need to do to get my server back up to exactly how it was before a crash / boot USB failure?

Link to comment
24 minutes ago, NMGMarques said:

Is there any way to automate the backup so it happens periodically? Right now, that function download the backup to my hard drive, and I would rather like it to backup to a spare USB connected to the unRAID machine itself. Also, does this backup my complete setup? Meaning, will this backup my dockers, configuration, etc? Or do I have to set up additional backup measures for this?

Basically, what would I need to do to get my server back up to exactly how it was before a crash / boot USB failure?

USB stick only contains config for Unraid (e.g. the array, disk settings etc.) and plugins.

 

Dockers and VM configs are on the storage device (array / cache) so they are not part of the flash backup. There is a CA Backup plugin (can't remember exact name) in the Apps store that you may want to have a look.

 

Backing up straight to a spare USB can be done by setting up a script to periodically sync between the main stick and the backup stick.

 

 

 

 

Link to comment
1 hour ago, testdasi said:

USB stick only contains config for Unraid (e.g. the array, disk settings etc.) and plugins.

 

Dockers and VM configs are on the storage device (array / cache) so they are not part of the flash backup. There is a CA Backup plugin (can't remember exact name) in the Apps store that you may want to have a look.

 

Backing up straight to a spare USB can be done by setting up a script to periodically sync between the main stick and the backup stick.

 

 

 

 

For the non linux plebe, how complicated would it be to create such a script? Is there any documentation out there to start me off?

Link to comment
25 minutes ago, NMGMarques said:

For the non linux plebe, how complicated would it be to create such a script? Is there any documentation out there to start me off?

You don't need to generate/write a script.  The CA Backup plugin will do the job. 

 

Do you have the Community Apps installed?  If not, see here:

 

     https://forums.unraid.net/topic/38582-plug-in-community-applications/

 

Search for 'CA Backup'.  Install it and read it. 

 

If you want to backup to a flash drive, you will probably have to use the Unassigned Devices plugin to mount the drive outside of the array.

 

 

Link to comment
30 minutes ago, NMGMarques said:

For the non linux plebe, how complicated would it be to create such a script? Is there any documentation out there to start me off?

Already provided that script, you just have to customize it.  And you've already been told that the CA Appdata Backup plugin has an option for the boot drive as well.

On 7/31/2020 at 8:28 AM, Energen said:

So the easiest way is to use the CA Appdata Backup plugin.. it's got an option for the USB drive.

 

Or if for some reason you don't want to use that plugin, you can run a User Script (user scripts plugin :P) to backup your drive also.. I have mine going to a Dropbox share daily.


#!/bin/bash

/usr/bin/rsync -avXHg --delete /boot/ /mnt/user/Dropbox/unraid_BootUSB_Backup;
chmod 777 -R /mnt/user/Dropbox/unraid_BootUSB_Backup;

 

 

So in the case of writing to another USB rather than a location on the array, you'd modify the destination path to whatever you have mounted in your unasssigned devices.

 

/mnt/user/disks/Backup_USB_Name

Link to comment
9 minutes ago, Energen said:

Already provided that script, you just have to customize it.  And you've already been told that the CA Appdata Backup plugin has an option for the boot drive as well.

 

So in the case of writing to another USB rather than a location on the array, you'd modify the destination path to whatever you have mounted in your unasssigned devices.

 

/mnt/user/disks/Backup_USB_Name

Oh, sorry. I didn't understand that it also backed up the flash drive. My bad. I somehow got it in my head that it would only backup the docker and app data.

Link to comment
1 minute ago, NMGMarques said:

Oh, sorry. I didn't understand that it also backed up the flash drive. My bad. I somehow got it in my head that it would only backup the docker and app data.

Note that there's a catch AFAIK with flash backup.

There can only be 1 device mounted with name UNRAID (exactly that name) so your backup stick partition cannot have the same name. However, Unraid would only boot with a partition named UNRAID exactly.

Therefore, you would still need to use a secondary computer to rename your backup stick to UNRAID (and run make_bootable etc.) for it to boot.

Link to comment
4 minutes ago, testdasi said:

Note that there's a catch AFAIK with flash backup.

There can only be 1 device mounted with name UNRAID (exactly that name) so your backup stick partition cannot have the same name. However, Unraid would only boot with a partition named UNRAID exactly.

Therefore, you would still need to use a secondary computer to rename your backup stick to UNRAID (and run make_bootable etc.) for it to boot.

Ok... So backing up directly to a stick doesn't make so much sense in this case. I'm getting a bit confused on what to do... So I guess the best would be to backup flash and appdata and dockers to a share, then have that share sync to something like Dropbox? And if things go wrong, somehow restore to a new flash drive? Would that be it, or is there a better way?

Link to comment
6 minutes ago, NMGMarques said:

Ok... So backing up directly to a stick doesn't make so much sense in this case. I'm getting a bit confused on what to do... So I guess the best would be to backup flash and appdata and dockers to a share, then have that share sync to something like Dropbox? And if things go wrong, somehow restore to a new flash drive? Would that be it, or is there a better way?

"If things go wrong" is a very generalised situation. Restoring the usb stick is a very specific action for a specific event i.e. your USB stick is corrupted, which is an independent event from lost data (e.g. docker appdata) so they shouldn't be in the same discussion.

 

The stick only contains Unraid and plugin configs (e.g. what disk to assign to what slot, etc.). For example, it stores WHERE in the storage devices (i.e. your HDD / SSD) to look for docker image (and VM libvirt i.e. xml template) but not the docker nor the "appdata" (referring to the docker appdata, NOT the Unraid configs).

 

A corrupted stick will NOT affect any data that is stored on the storage devices (i.e. your HDD / SSD), including docker image, appdata, VM etc.

And conversely, restoring to a new flash drive will NOT, on its own, bring back your docker and VM settings.

 

If your docker / appdata is lost, you would restore that separately from the backup (or as a last resort from the cloud).

 

There is still merit to having a live backup of your boot stick even if you still need a secondary computer to make it bootable.

Firstly, storing your flash backup in a share (i.e. the Unraid array) isn't really a good idea because you need the Unraid stick to boot up the array to get the backup, which you can't because your main stick is corrupted and you need to restore to a new stick, which is always a last resort action.

Having a live backup stick plugged into the system will preempt stuff like

  • Where is my backup stick? <-- funny but true, try looking for a USB stick you haven't touched since last year
  • Where did I store my backup?
  • Oh no, Internet is down, can't get things back from the cloud
  • Dropbox is down
  • etc.

So with a live backup stick, you just unplug from server, plug to your (let's say) laptop, change volume name to UNRAID, run make_bootable.bat, put new stick back on server, turn on server, boot up, license replacement procedure. Done.

 

 

 

 

Link to comment
3 minutes ago, testdasi said:

"If things go wrong" is a very generalised situation. Restoring the usb stick is a very specific action for a specific event i.e. your USB stick is corrupted, which is an independent event from lost data (e.g. docker appdata) so they shouldn't be in the same discussion.

 

The stick only contains Unraid and plugin configs (e.g. what disk to assign to what slot, etc.). For example, it stores WHERE in the storage devices (i.e. your HDD / SSD) to look for docker image (and VM libvirt i.e. xml template) but not the docker nor the "appdata" (referring to the docker appdata, NOT the Unraid configs).

 

A corrupted stick will NOT affect any data that is stored on the storage devices (i.e. your HDD / SSD), including docker image, appdata, VM etc.

And conversely, restoring to a new flash drive will NOT, on its own, bring back your docker and VM settings.

 

If your docker / appdata is lost, you would restore that separately from the backup (or as a last resort from the cloud).

 

There is still merit to having a live backup of your boot stick even if you still need a secondary computer to make it bootable.

Firstly, storing your flash backup in a share (i.e. the Unraid array) isn't really a good idea because you need the Unraid stick to boot up the array to get the backup, which you can't because your main stick is corrupted and you need to restore to a new stick, which is always a last resort action.

Having a live backup stick plugged into the system will preempt stuff like

  • Where is my backup stick? <-- funny but true, try looking for a USB stick you haven't touched since last year
  • Where did I store my backup?
  • Oh no, Internet is down, can't get things back from the cloud
  • Dropbox is down
  • etc.

So with a live backup stick, you just unplug from server, plug to your (let's say) laptop, change volume name to UNRAID, run make_bootable.bat, put new stick back on server, turn on server, boot up, license replacement procedure. Done.

 

 

 

 

Ok. I think I understand a bit better now. So it's basically a two part thing, with the USB being somewhat independent from the Dockers. So in that case, the live USB does make sense after all. And I suppose that this, coupled with CA Backup for the dockers, would have me covered. However, your statement did make me pause for consideration: So if the USB fails and I am able to recreate it using the live USB and the method you described, am I to assume that I can just boot back up and all would be running as I left it, including my dockers and VM's etc... as long as I didn't lose any data on the array? Or will I still have to recreate these, using the CA Bakups?

Link to comment
17 minutes ago, NMGMarques said:

So if the USB fails and I am able to recreate it using the live USB and the method you described, am I to assume that I can just boot back up and all would be running as I left it, including my dockers and VM's etc... as long as I didn't lose any data on the array? Or will I still have to recreate these, using the CA Bakups?

That assumption is correct. No need to recreate stuff stored on the storage devices.

 

You probably are thinking Windows. If Windows installation is corrupted, chances are you will have to reinstall Windows + all the apps like Office.

 

Unraid is different.

 

Using the Windows analogy, the Unraid USB stick is like your motherboard BIOS. A corrupted BIOS means your Windows won't boot up at all but reflashing the BIOS doesn't require you to reinstall Windows.

Link to comment
Just now, testdasi said:

That assumption is correct. No need to recreate stuff stored on the storage devices.

 

You probably are thinking Windows. If Windows installation is corrupted, chances are you will have to reinstall Windows + all the apps like Office.

 

Unraid is different.

 

Using the Windows analogy, the Unraid USB stick is like your motherboard BIOS. A corrupted BIOS means your Windows won't boot up at all but reflashing the BIOS doesn't require you to reinstall Windows.

Ok, got it now. Thanks for sticking with me.

 

I also found the CA Backups and have installed the plugin. I'll now search for documentation on how to correctly configure it. As told, it seems it will also backup the flash drive. In this case, I suppose I will not need to also perform a script / manual backup, and rather just use the CA Backup plugin instead, correct?

Link to comment
16 minutes ago, NMGMarques said:

Ok, got it now. Thanks for sticking with me.

 

I also found the CA Backups and have installed the plugin. I'll now search for documentation on how to correctly configure it. As told, it seems it will also backup the flash drive. In this case, I suppose I will not need to also perform a script / manual backup, and rather just use the CA Backup plugin instead, correct?

Yes

Link to comment
  • 7 months later...

I am running 6.9.1. Recently I noticed that CA plugin "Appdata Backup/Restore v2" issued notice within its plugin:

"NOTE: USB Backup is deprecated on Unraid version 6.9.0 It is advised to use the Unraid.net plugin instead"

 

I wasn't able to find "Unraid.net plugin" for automated, scheduled backing up of USB in the way that "Appdata Backup/Restore v2" did it.

 

Is manual USB backup now the only way to backup USB configuration?

 

 

 

 

Link to comment
4 minutes ago, tmor2 said:

I am running 6.9.1. Recently I noticed that CA plugin "Appdata Backup/Restore v2" issued notice within its plugin:

"NOTE: USB Backup is deprecated on Unraid version 6.9.0 It is advised to use the Unraid.net plugin instead"

 

I wasn't able to find "Unraid.net plugin" for automated, scheduled backing up of USB in the way that "Appdata Backup/Restore v2" did it.

 

Is manual USB backup now the only way to backup USB configuration?

 

 

 

 


The Unraid.net plugin does automated backup to the cloud (on Limetech servers).   If you want local backup then the manual method is the long term solution.

Link to comment
  • 4 months later...

OK, So I run the "Flash Backup" from the "Boot Device" menu of the "Main" tab...

 

That downloaded a zip-file of the name <name-flash-backup-20210831-0145> in my downloads directory on my Win10PC...

 

1) Am I now supposed to use the "Extract files..." option and select my 32GB zip drive to unzip that file onto the USB?

2) Is that all there is to it?

3) Does this also transfer my license? If not, what else do I have to do to accomplish this step?

 

Thank you 

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.