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.

Latest (super easy) method for automated flash zip backup!

Featured Replies

  • Author
1 hour ago, L0rdRaiden said:

 

Thanks, it works perfectly  :) I have learnt a lot with you

 

Together with this Script (the first one in my life) and Kopia I have tune up my backup system 

 

#!/bin/bash
/usr/local/emhttp/webGui/scripts/notify -e "Unraid Server Notice" -s "OneDrive backup started" -d "Synchronizing Kopia backup to OneDrive" -i "normal"
echo 'OneDrive backup started'

rclone sync /mnt/user/Backup/Kopia OneDrive:"/Backup/Kopia"

/usr/local/emhttp/webGui/scripts/notify -e "Unraid Server Notice" -s "OneDrive backup finished" -d "Synchronization completed" -i "normal"
echo 'One Drive backup completed'

 

good deal! glad it all worked out.

  • Replies 53
  • Views 14.8k
  • Created
  • Last Reply

Top Posters In This Topic

Most Popular Posts

  • Does your backup directory (/mnt/user/NCloud/Mihle/files/Filer/Backup/NAS Flash Backup/) already exist?   If not, it needs to be created before the script runs.  I learned this making my Ple

  • done

  • This script is built on the native unraid script that includes the zip function. However, it would be easy enough to add an unzip function to my backup script for you to use. I wrote this fairly quick

Posted Images

You are my Hero!

After 3 Hours searching for a possibility to daily Backup the Flashdrive or its content i found this script.

 

And what to say...

Create Folders

C&P the Script

Fill the blanks

Set the Schedule

Fire and Forget

 

Awesome! Thank you

 

P.S: optional e-mail notification would be nice (i'm not so ften on my unraid gui)

Edited by Protheus

34 minutes ago, Protheus said:

You are my Hero!

After 3 Hours searching for a possibility to daily Backup the Flashdrive or its content i found this script.

 

And what to say...

Create Folders

C&P the Script

Fill the blanks

Set the Schedule

Fire and Forget

 

Awesome! Thank you

 

P.S: optional e-mail notification would be nice (i'm not so ften on my unraid gui)

I have all the Unraid notifications on telegram. I think it was configured from the settings page

47 minutes ago, L0rdRaiden said:

I have all the Unraid notifications on telegram. I think it was configured from the settings page

Hm...you're right. I have Telegram configured too. But...i didn't ever noticed that it not work anymore 😕

 

Edit: Ok that is working now. But i get all messages twice

 

1168014478_Screenshot-2022-02-0522_47_50-Telegram-Message-Twice.png.20950c2538e73c864544860462edb487.png

If someone have a clue please PM me.

Edited by Protheus

  • Author
On 2/5/2022 at 2:30 PM, Protheus said:

You are my Hero!

After 3 Hours searching for a possibility to daily Backup the Flashdrive or its content i found this script.

 

And what to say...

Create Folders

C&P the Script

Fill the blanks

Set the Schedule

Fire and Forget

 

Awesome! Thank you

 

P.S: optional e-mail notification would be nice (i'm not so ften on my unraid gui)

Glad you like it! At the moment, i don't have enough hours in the day to tackle e-mail notifications for this. Maybe someone else could tack on and i'd be happy to add to the OP. If not, perhaps at some point in the future I could see what i can do in that regard. Cheers!

  • 1 month later...

The Notification is only GUI?

No Mail or others when this in the Notification Settings defined?

I get email notifications.

Great!

I get it too!

 

Many Thanks!

I only use email notifications but it’s my understanding that whatever forms of notification you have enabled will be used.

  • 7 months later...

I know I'm late to this party but, I tried this script and found my "native unraid backup script" is missing/deleted. 

 

Has the native backup script referenced been removed by the Unraid updates due to the backing up to their online? If so, any chance on updating the script to to work without the native one?

 

Anyways thank you. 

Nevermind. I fixed it.

 

But thank you for the scripts. This one and the Plex one!!!!

Thanks a lot for this great script. Found this page after restoring my USB flash drive that recently died and realising that the last backup happened to be 1.5 years old 🙄

Edited by rob_robot

  • 3 months later...

So I am brand new to unraid, just built my first server this past weekend. I previous only had synology NAS for about a year. Mainly running plex server.

 

I ran the script from watching the youtube video, I copied the script from your google link in the video description. My destination was a remote SMB share on my synology NAS. So the only thing I did different from your video was the destination and changed my tower name in the notification part and removed the # from the beginning. However after I manually ran the script it caused my server to crash. Kept saying directory not found over and over. WEBGUI was not working and I had to unplug my server from power and reboot. Im running on Unraid 6.11.5. 

 

Does this still work and does it work for Remote SMB shares? 

How's the remote smb share mounted? It would need to be mounted, that'd have to be checked etc

12 hours ago, Kilrah said:

How's the remote smb share mounted? It would need to be mounted, that'd have to be checked etc

Yeah it is mounted. 

  • 2 years later...

Any changes under Unraid 7 needed?

Please add a Version Number in the Script for tracking changes.

  • Author

Honestly I haven’t looked at this in a couple years. I’d be happy to take another gander at it this weekend. Until I repost some sort of update, I have posted what versions this has been tested on and any versions not included in that should be used with extreme caution. 
 

it’s been semi deprecated since myunraid plugin backs up the flash drive. 

1 hour ago, Cpt. Chaz said:

it’s been semi deprecated since myunraid plugin backs up the flash drive. 

OK, I don't used it. Locally Backups/no extern access are more likely.

 

1 hour ago, Cpt. Chaz said:

I’d be happy to take another gander at it this weekend.

Many Thanks! I'm curious.

Nothing's changed in the flash backup method for a looong while. Also Appdata Backup plugin takes care of that for most people. 

2 minutes ago, Kilrah said:

Appdata Backup plugin

Unless it makes the backup to an Unassigned Device, you will be in the Catch-22 situation of needing to boot Unraid to get the backup you need to boot Unraid.

 

 

9 hours ago, trurl said:

Unless it makes the backup to an Unassigned Device, you will be in the Catch-22 situation of needing to boot Unraid to get the backup you need to boot Unraid.

Obviously you need to choose your destination wisely, same as this script or any method. It has a field for a 2nd location to copy to. I don't use it, but rsync my appdata backups to another machine.

Edited by Kilrah

I use Unraid Connect (offsite backup of flash), Appdata Backup (yes it's on the array but I know how to get it if I really need to go to the trouble) and also manually download flash backup before and after Unraid version change, or any important change to my configuration. And I never have trouble with my boot flash, but you never know what might happen.

  • 1 month later...
On 3/12/2025 at 7:34 PM, Cpt. Chaz said:

Honestly I haven’t looked at this in a couple years. I’d be happy to take another gander at it this weekend. Until I repost some sort of update, I have posted what versions this has been tested on and any versions not included in that should be used with extreme caution. 
 

it’s been semi deprecated since myunraid plugin backs up the flash drive. 

What unraid plugin are you talking about? Ive been using your user script but I'm also interested in the plugin also!

48 minutes ago, DarkZennen said:

What unraid plugin are you talking about?

Unraid Connect.

The Appdata backup plugin can back up the flash too and is a common solution for that since you typically do want to backup your appdata anyway.

  • 1 year later...

I noticed this broke when I updated to v7.3.0.

Only issue appears to be that the generated backup name changed from flash-backup to boot-backup.

Depending on how many days since you upgraded you may have a lot of copies of your flash backup in / so delete them or move them to their intended location so they aren't lost on reboot.

EDIT: just decided to copy out my copy of the script and paste it here. This is with the latest fix for v7.3.0

#!/bin/bash

##### PRE RUN CHECK IF ARRAY IS STARTED ######
ls /mnt/disk[1-9]* 1>/dev/null 2>/dev/null
if [ $? -ne 0 ]
then
   echo "ERROR:  Array must be started before using this script"
   logger "ERROR:  Array must be started before using this script"
   exit
fi

#### SECTION 1 ####------------------------------------------------------------------------------------------------------
#dir = WHATEVER FOLDER PATH YOU WANT TO SAVE TO
dir="YOUR_DIR_HERE"

echo 'Executing native unraid backup script'
/usr/local/emhttp/webGui/scripts/flash_backup

#### SECTION 2 ####------------------------------------------------------------------------------------------------------
echo 'Remove symlink from emhttp'
find /usr/local/emhttp/ -maxdepth 1 -name '*boot-backup-*.zip' -delete

sleep 5

#### SECTION 3 ####------------------------------------------------------------------------------------------------------
if [ ! -d "$dir" ] ; then
 
			echo "making directory as it does not yet exist"

			# make the directory as it doesnt exist
			mkdir -vp "$dir"
		else
			echo "As $dir exists continuing."
			fi


#### SECTION 4 ####------------------------------------------------------------------------------------------------------
echo 'Move Flash Zip Backup from Root to Backup Destination'
mv /*-boot-backup-*.zip "$dir"

sleep 5

#### SECTION 5 ####------------------------------------------------------------------------------------------------------
echo 'Deleting Old Backups'

#ENTER NUMERIC VALUE OF DAYS AFTER "-MTIME +"
find "$dir"* -mtime +YOUR_DAYS_HERE -exec rm -rfv {} \;

echo 'All Done'

#### SECTION 6 ####------------------------------------------------------------------------------------------------------

#UNCOMMENT THE NEXT LINE TO ENABLE GUI NOTIFICATION UPON COMPLETION 
/usr/local/emhttp/webGui/scripts/notify -e "Unraid Server Notice" -s "Flash Zip Backup" -d "A copy of tower unraid flash disk has been backed up" -i "normal"

exit

Edited by weirdcrap

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...

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.