2024-09-23 16:59:45 -05:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
2024-10-01 22:57:18 -05:00
|
|
|
set -eo pipefail
|
2024-10-01 22:29:17 -05:00
|
|
|
|
|
|
|
# If the -q (quiet) flag is supplied, send all output to /dev/null.
|
2024-09-23 16:59:45 -05:00
|
|
|
if [[ "$1" == "-q" ]]; then
|
|
|
|
exec >/dev/null 2>&1
|
|
|
|
fi
|
|
|
|
|
2024-09-27 17:54:14 -05:00
|
|
|
if ! rsync -avz --delete root@hyperreal.coffee:/srv/borgbackup/hyperreal/ /mnt/borgbackup/hyperreal; then
|
2024-09-23 16:59:45 -05:00
|
|
|
/home/jas/bin/resend_error.py "hyperreal-borg"
|
2024-09-27 17:54:14 -05:00
|
|
|
logger -t sync_remotes "Error during sync of hyperreal-borg"
|
2024-09-23 16:59:45 -05:00
|
|
|
fi
|
|
|
|
|
2024-10-01 22:29:17 -05:00
|
|
|
logger -t sync_remotes "hyperreal-borg successfully synced"
|
|
|
|
|
2024-09-27 17:54:14 -05:00
|
|
|
if ! rsync -avz --delete root@auxnc-96g:/srv/backup/auxnc-96g/ /mnt/borgbackup/auxnc-96g; then
|
2024-09-23 16:59:45 -05:00
|
|
|
/home/jas/bin/resend_error.py "auxnc-96g-borg"
|
2024-09-27 17:54:14 -05:00
|
|
|
logger -t sync_remotes "Error during sync of auxnc-96g-borg"
|
2024-09-23 16:59:45 -05:00
|
|
|
fi
|
|
|
|
|
2024-10-01 22:29:17 -05:00
|
|
|
logger -t sync_remotes "auxnc-96g-borg successfully synced"
|
|
|
|
|
2024-09-27 17:54:14 -05:00
|
|
|
if ! rsync -avz --delete root@hyperreal.coffee:/home/mastodon/live/public/system/ /mnt/mastodata; then
|
2024-09-23 16:59:45 -05:00
|
|
|
/home/jas/bin/resend_error.py "mastodata"
|
2024-09-27 17:54:14 -05:00
|
|
|
logger -t sync_remotes "Error during sync of mastodata"
|
2024-09-23 16:59:45 -05:00
|
|
|
fi
|
|
|
|
|
2024-10-01 22:29:17 -05:00
|
|
|
logger -t sync_remotes "mastodata successfully synced"
|
|
|
|
|
2024-10-01 23:03:34 -05:00
|
|
|
if ! rsync -avz --delete root@desktop:/home/jas/sync-to-protondrive/ /mnt/desktop_data; then
|
2024-10-01 22:29:17 -05:00
|
|
|
/home/jas/bin/resend_error.py "desktop-data"
|
|
|
|
logger -t sync_remotes "Error during sync of desktop-data"
|
|
|
|
fi
|
|
|
|
|
|
|
|
logger -t sync_remotes "desktop-data successfully synced"
|
|
|
|
|
2024-09-23 16:59:45 -05:00
|
|
|
exit 0
|