Created
March 21, 2016 22:20
-
-
Save janniklorenz/e5580c22c5d92965c8e3 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| #rsync -a --progress --exclude "Git/.*" /mnt/data/Pools/ /mnt/backup/Pools/ | |
| function copyBackup { | |
| if [ -b /dev/disk/by-uuid/$1 ] | |
| then | |
| { | |
| sudo mount /dev/disk/by-uuid/$1 /mnt/backup | |
| rsync -a --delete --stats --exclude "Git/.*" /mnt/data/Pools/ /mnt/backup/Pools/ | |
| sudo umount /mnt/backup | |
| echo "\n$2 Done" | |
| } | mail -s "Backup: $2" root | |
| fi | |
| } | |
| copyBackup "5c0c6e81-ff71-43f6-8dab-19c9a2dd1dfb" "Backup 1" | |
| #copyBackup "" "Backup 2" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment