ccsnet Posted March 3, 2019 Share Posted March 3, 2019 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 Quote Link to comment
cpshoemake Posted March 3, 2019 Share Posted March 3, 2019 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" 1 Quote Link to comment
ccsnet Posted March 9, 2019 Author Share Posted March 9, 2019 (edited) 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 Edited March 9, 2019 by ccsnet Quote Link to comment
Arbadacarba Posted August 20, 2019 Share Posted August 20, 2019 (edited) 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 September 10, 2019 by Arbadacarba 1 Quote Link to comment
Arbadacarba Posted September 10, 2019 Share Posted September 10, 2019 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. Quote Link to comment
Recommended Posts
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.