diff options
author | Óscar Nájera <hi@oscarnajera.com> | 2022-11-12 19:56:26 +0100 |
---|---|---|
committer | Óscar Nájera <hi@oscarnajera.com> | 2022-11-12 19:56:26 +0100 |
commit | 4bcded754c5341bf82551a17d1383a62c8987f71 (patch) | |
tree | d054dd2ee458718247d7980690c8c715cd843be8 /bin | |
parent | 10d08d478be616fba32c9fac80252f8c0b95bca3 (diff) | |
download | dotfiles-4bcded754c5341bf82551a17d1383a62c8987f71.tar.gz dotfiles-4bcded754c5341bf82551a17d1383a62c8987f71.tar.bz2 dotfiles-4bcded754c5341bf82551a17d1383a62c8987f71.zip |
skip backup when $DISK not mounted
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/backup.sh | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/bin/backup.sh b/bin/backup.sh index 8a27847..49c5e72 100755 --- a/bin/backup.sh +++ b/bin/backup.sh @@ -43,7 +43,10 @@ backup_local() { --keep-monthly 6 $REPOSITORY } -DISK=/run/media/titan/ext_backup -# backup_local borgbackup ssh://backup/media/Backup/daily_backup/ ~/dev/ ~/.mail/ ~/.bogofilter/ ~/Nextcloud/ ~/org/ "$DISK/personal/Pictures/" "$DISK/personal/Libros/" "$DISK/personal/dev/" "$DISK/Archives/" backup_local Admin/sarah/borg/ingrid ssh://borgbackup@173.212.211.30/./repos/ingrid ~/dev/ ~/org/ ~/.mail/ ~/.bogofilter/ ~/Nextcloud/ -backup_local Admin/sarah/borg/oscar ssh://borgbackup@173.212.211.30/./repos/oscar "$DISK/personal/Pictures/" "$DISK/personal/Libros/" "$DISK/personal/dev/" "$DISK/Archives/" + +DISK=/run/media/titan/ext_backup +if [ -d "$DISK" ]; then + # backup_local borgbackup ssh://backup/media/Backup/daily_backup/ ~/dev/ ~/.mail/ ~/.bogofilter/ ~/Nextcloud/ ~/org/ "$DISK/personal/Pictures/" "$DISK/personal/Libros/" "$DISK/personal/dev/" "$DISK/Archives/" + backup_local Admin/sarah/borg/oscar ssh://borgbackup@173.212.211.30/./repos/oscar "$DISK/personal/Pictures/" "$DISK/personal/Libros/" "$DISK/personal/dev/" "$DISK/Archives/" +fi |