Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

[SOLVED] UnRAID Flash backup?

Featured Replies

I was wondering if there is a good solution to do a complete USB flash drive backup periodically? Considering all the plugins and config work done it would be a PITA if the flash drive got corrupted and everything was lost.

 

Equally a pain would be having to yank out the USB drive to backup periodically as I am unlikely to remember, and the server isn't convenient to get to all the time.

 

Is there a good solution anyone knows of to do this weekly or monthly? Ideally I would like to export it to another machine (Windows based).

i have my flash set as a hidden share and monthly or before i do any changes i copy entire flash contents to a folder with usb thumb drive type and date. could be easily setup using allway sync or whatever type software. I just do it manually through explorer.

If you want it exported to the Windows machine I suppose it would be easiest to just do it manually from time to time.  Other than writing logfiles to the flash drive, whats contained on it is pretty static.  I just copy the contents to a folder on my desktop machine every time I make changes to the flash, which isn't very often (either OS upgrade or server customization).

 

If you wanted to do it automatically you could setup a simple shell script to rsync the contents of the flash drive to an array drive or cache drive.

  • Author

Thanks guys. I guess I was overthinking this a bit (I do that from time to time).

 

For some reason I didn't think \\tower\flash showed the entire drive, but I think I was confusing it with when you telnet in you are not at the root of the drive, and was thinking \flash did the same thing.

 

I guess this isn't nearly as difficult as I was thinking - I was more focused on the work to rebuild if something went awry as I really don't remember all the config I did for SAB, SB, CP, etc.

 

Thanks

I have a script that I run daily on a Windows box that archives my unRAID server(s) with WinRAR.  I could post it tonight when I get home.  It is scheduled in Win scheduler so schedule is completely controllable.  I first copy the entire flash drive to my backup server then run WinRAR to create the archive then delete the copied directory.  I do it that way because I setup the date and time for the directory name and use that as the parameter to WinRAR for the archive name.

 

Edit here it is finally:

set hour=%time: =0%
SET isodt=Media1-%date:~10,4%-%date:~4,2%-%date:~7,2%-%hour:~0,2%-%time:~3,2%-%time:~6,2%
xcopy \\Media1\flash\*.* "\\N54L\Backup\Media1\%isodt%\" /S /E /Z /I
"%ProgramFiles%\WinRAR\WinRAR.exe" m -CFG -r -dh -m5 -md4096 -s -t -rr -ep1 "\\N54L\Backup\Media1\%isodt%.rar" "\\N54L\Backup\Media1\%isodt%\*.*"
rmdir "\\N54L\Backup\Media1\%isodt%\"

here's my effort, i run this using a cron job, runs weekly, i then do a secondary backup of the resulting tar file to my windows box, script is attached, please remove txt extension and edit before running.

 

I was more focused on the work to rebuild if something went awry as I really don't remember all the config I did for SAB, SB, CP, etc.

 

ok this is more about backing up the drive that contains the installation of your plugins, which in most cases is your cache drive, again this can be done via script and is something im also doing :-), i did see a better script than mine that got posted, will see if i can locate it and post the url

 

edit - found it!!, script from dirtysanchez http://lime-technology.com/forum/index.php?topic=31246.msg282114#msg282114

 

edit edit - ok decided to include my cache drive backup script too, enjoy  ;D

unraid_flash_backup.sh.txt

unraid_cache_backup.sh.txt

 

I implemented the dirtysanchez script on my server (with required changes for my system).  Works great and uses rsync so only differences are copied.  My first cache backup took 45 mins because of my large Plex library database.  Subsequent backups only take about 4 mins to rsync changes.

 

I implemented the dirtysanchez script on my server (with required changes for my system).  Works great and uses rsync so only differences are copied.  My first cache backup took 45 mins because of my large Plex library database.  Subsequent backups only take about 4 mins to rsync changes.

 

Wow, how big is your library database?  Did you enable media index files?  Is that why it's so large?

Wow, how big is your library database?  Did you enable media index files?  Is that why it's so large?

 

My entire cache apps folder is about 25GB (with most of that the Plex database).  I determined the 45 mins for the initial rsync from looking at the times in the Syslog from the services being stopped and then restarting.  Some of that time may have included the actual time to stop and start them.

 

I once accidentally enabled the Index files and saw after a couple days my 120GB SSD Cache drive went to less than 10GB free and it was still indexing.  I disabled Indexing and found instructions on the Plex forum for deleting the index files.  I don't personally see much value in them.  I use 3rd gen AppleTVs as my Plex Clients using PlexConnect and they don't utilize the index files.

Interesting that it took that long.  I don't recall my initial rsync taking anywhere near that long (my apps folder is about 14GB), but that was also many months ago and I've slept numerous times since then.  :o;D

 

That said, I do know that the Plex library folder is tens of thousands of very small files, which obviously slows writes dramatically.

 

I've considered enabling media index files myself, since most of my clients are Rokus (so the index files would be useful), but just decided it wasn't worth it for me.  I didn't want 100's of GB of thumbnails, lol.

 

Glad you got it all backing up automatically.  :)

Thank you dirtysanchez for providing your script so I could implement this.

The only issue I had was when first running the script manually I got an error from EOL characters in the file.

I was using Notepad++ to create/edit the script which I thought wouldn't add those, but I googled and found you have to either change default settings or run the "EOL Conversion" utility.  After that it worked great.  I had set it to run in the cron.daily folder while I test it out and make sure it is working (and that my apps are properly restarted afterwards).  Now it is configured to only run weekly.

 

I used to do a Cache copy manually using MC through telnet interface.

The copy would take forever, and I had to have my apps stopped during the whole copy process.

This rsync is much nicer, far faster, and is now automated to run at night.

 

My next task is to convert my Desktop Windows "ROBOCOPY" weekly backups to my unRaid server to an rsync backup.

 

rsync the boot drive to some other server's share, a 2nd thumb drive or whatever is best as rsync only copies changes and runs very quick if there are not any changes. I run it from cron, inserting from within the go script.

Archived

This topic is now archived and is closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.