add: BFDS offsite backup script
This commit is contained in:
1 parent
49851193e4
commit
b85b49bdd0
2 files changed
+30
No files matched your search
Executable
+22
@@ -0,0 +1,22 @@
|
||||
#!/bin/zsh
|
||||
|
||||
# FIRST Encrypt!
|
||||
## von Hand und mit Dolphin
|
||||
|
||||
|
||||
|
||||
# only run when BFDS-OFFSITE-1 or BFDS-OFFSITE-2 is attached
|
||||
# find correct drive `ls -l /dev/disk/by-label/BFDS-OFFSITE-1` or `lsblk -o name,mountpoint,label,size,uuid /dev/sdb1 | grep BFDS-OFFSITE-`
|
||||
# BFDS-OFFSITE-1 UUID: 45f76efd-1cb0-4ade-b610-0443eb8079e9
|
||||
|
||||
# find correct drive `ls -l /dev/disk/by-label/BFDS-OFFSITE-1` or `lsblk -o name,mountpoint,label,size,uuid /dev/sdb1 | grep BFDS-OFFSITE-`
|
||||
string=`ls -l /dev/disk/by-label/BFDS-OFFSITE-*`
|
||||
if [[ $string != *"BFDS-OFFSITE-"* ]]; then
|
||||
echo "\n ABBRUCH! Keine angeschlossene OFFSITE Festplatte gefunden."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# run backup
|
||||
sourceDir="bfds:/mnt/bfds/" # on BFDS
|
||||
destinationDir="/run/media/rob/BFDS-OFFSITE-1/BFDS"
|
||||
rsync -a -zz --stats --progress $sourceDir $destinationDir
|
||||
Reference in new issue
Block a user