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.

General Backup To Usb Questions ... What's your experiences ?

Featured Replies

For discussion and sharing experiences...

 

Havingspent some time now with Unraid and coming from Windows server I'm surprised there are not more really good backup options to local usb storage.

 

Duplicati seems to be the best but I have found it slow and not as polished as any other backup app in the windows world.

 

I like cloudberry but reading there seems to be a 5tb limit (correct me if I am wrong please).

 

If I want to do just a file level then I could use rsync etc but that's more a copy than a back up.

 

If love to see native bare metal backup support in Unraid but I suspect that may not be even considered at this time.

 

So what are people's experiences when it comes to backing up large amounts of data to a local usb drive and not the cloud.

 

Are there any best practices or left feild suggestions ?

 

Terran

I mount mine in Unassigned Devices and use the User Scripts plugin to run an rsync script weekly. Unassigned Devices can even set a script to run automatically on connection.

rsync -aq --delete --log-file="/mnt/disks/backup1/Backup share log" /mnt/user/Backup/ "/mnt/disks/backup1/Backup share"

 

  • Author

Hi - I've set a script up but its slow on mine as it is duplicati.

 

I need to do some further investigation but I'd say USB 3 is just slow even with the PCI E card I now have.

 

Re the scripts them selves this is what I ended up with as I have 2 disks I switch...

#!/bin/bash

#disk1
rsync -aqv --progress --delete --log-file="/mnt/disks/backup1/Backup share log" /mnt/user/ "/mnt/disks/backup1/usershares"
rsync -aqv --progress --delete --log-file="/mnt/disks/backup1/flash log" /etc/libvirt/ "/mnt/disks/backup1/libvirt"

#disk2
rsync -aqv --progress --delete --log-file="/mnt/disks/backup2/Backup share log" /mnt/user/ "/mnt/disks/backup2/usershares"
rsync -aqv --progress --delete --log-file="/mnt/disks/backup2/flash log" /etc/libvirt/ "/mnt/disks/backup2/libvirt"

T

Capture.PNG

Edited by ccsnet

  • 5 months later...
  • Community Expert

I've used the Script option built right into Unassigned Devices.

 

I found a script on the support page and then modified it to fit my needs. I want it to backup certain folders to my First 5tb USB drive and others to a Second 5TB drive so I wrote a gereric script and have two versions loaded on with the two drive profiles.

 

I still have a few tweaks I might do, but this is working so far:

 

#!/bin/bash

PATH=/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin:/usr/local/emhttp/webGui/scripts

########## Edit Variable Names and list Shares to be backed up ##########

ServerName=("Tower")
DiskName=("Backup #")
ShareNames=("Share1" "Share2" "ETC")

########## Static Script Section Bellow ##########

NumberOfShares=${#ShareNames[@]}

case $ACTION in
  'ADD' )
    sleep 2
#        /usr/local/emhttp/webGui/scripts/notify -e "Unraid Server Notice" -s "Server Backup" -d "Jupiter Backup Test Drive Mounted" -i "normal"
    if [ -d $MOUNTPOINT ]
    then
      if [ $OWNER = "udev" ]
      then

        logger Started -t$PROG_NAME
        notify -e "Unraid Server Notice" -s "${ServerName} Backup" -d "${DiskName} initiated" -i "normal"
        echo "Started: `date`" > $LOGFILE

##########          ##########          ##########          ##########          ##########

        counter=0
        while (( counter <= NumberOfShares-1 ))
        do
         sequential=${counter}
         let sequential++
         sleep 1
         logger $ShareNames[counter] share -t$PROG_NAME
         if (rsync -a -v /mnt/user/${ShareNames[counter]} $MOUNTPOINT/ 2>&1 >> $LOGFILE)
          then
           {
            notify -e "Unraid Server Notice" -s "${ServerName} Backup (${sequential}/${NumberOfShares})" -d "${ServerName} ${ShareNames[counter]} Share Backup Completed" -i "normal"
            echo "${ShareNames[counter]} Backed up: `date`" >> $LOGFILE
            echo >> $LOGFILE
           }
          else
           {
            notify -e "Unraid Server Notice" -s "${ServerName} Backup (${sequential}/${NumberOfShares})" -d "${ServerName} ${ShareNames[counter]} Share Backup FAILED" -i "alert"
            echo "${ShareNames[counter]} FAILED to back up: `date`" >> $LOGFILE
            echo >> $LOGFILE
           }
         fi
         let counter++
        done
        sleep 1

##########          ##########          ##########          ##########          ##########

    # Create Backup of Flash Drive
    flash_backup

    # Copy Backup to USB Drive

         sleep 1
         logger Flash Backup -t$PROG_NAME
         if (rsync -a -v /*flash-backup*.zip $MOUNTPOINT/Flash/ 2>&1 >> $LOGFILE)
          then
           {
            notify -e "Unraid Server Notice" -s "${ServerName} Backup" -d "${ServerName} Flash Backup Completed" -i "normal"
            echo "Flash Drive Backed up: `date`" >> $LOGFILE
            echo >> $LOGFILE
           }
          else
           {
            notify -e "Unraid Server Notice" -s "${ServerName} Backup" -d "${ServerName} Flash Backup FAILED" -i "alert"
            echo "Flash Drive FAILED to back up: `date`" >> $LOGFILE
            echo >> $LOGFILE
           }
         fi

        sleep 1


    # Delete zip file
    rm /*flash-backup*.zip
    rm /usr/local/emhttp/*flash-backup*.zip

##########          ##########          ##########          ##########          ##########

        logger Syncing -t$PROG_NAME
        sync

        logger Unmounting ${DiskName} -t$PROG_NAME
        /usr/local/sbin/rc.unassigned umount $DEVICE

       echo "Completed: `date`" >> $LOGFILE
        logger ${DiskName} drive can be removed -t$PROG_NAME

        notify -e "Unraid Server Notice" -s "${ServerName} Backup" -d "${DiskName} completed" -i "normal"
    fi
    else
        logger ${DiskName} Not Mounted -t$PROG_NAME
  fi
  ;;

  'REMOVE' )
  ;;

  'ERROR_MOUNT' )

notify -e "Unraid Server Notice" -s "${ServerName} Backup" -d "Could not mount ${DiskName}" -i "normal"
  ;;

  'ERROR_UNMOUNT' )

notify -e "Unraid Server Notice" -s "${ServerName} Backup" -d "Could not unmount ${DiskName}" -i "normal"
  ;;
esac

Edit: Cleaned up some timing issues, added variables, and added a backup of the flash drive

 

Edited by Arbadacarba

  • 3 weeks later...
  • Community Expert

My next task will be to use these on two permanently plugged in 8TB USB drives and get them mounted on a schedule and then let the script unmount them.

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.