2024-09-23 23:59:45 +02:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
2024-10-02 05:57:18 +02:00
|
|
|
set -eo pipefail
|
2024-10-02 05:29:17 +02:00
|
|
|
|
|
|
|
# If the -q (quiet) flag is supplied, send all output to /dev/null.
|
2024-09-23 23:59:45 +02:00
|
|
|
if [[ "$1" == "-q" ]]; then
|
|
|
|
exec >/dev/null 2>&1
|
|
|
|
fi
|
|
|
|
|
2024-09-28 00:54:14 +02:00
|
|
|
if ! rsync -avz --delete root@hyperreal.coffee:/srv/borgbackup/hyperreal/ /mnt/borgbackup/hyperreal; then
|
2024-09-23 23:59:45 +02:00
|
|
|
/home/jas/bin/resend_error.py "hyperreal-borg"
|
2024-10-09 07:38:44 +02:00
|
|
|
logger -t sync_from_remotes "Error during sync of hyperreal-borg"
|
2024-09-23 23:59:45 +02:00
|
|
|
fi
|
|
|
|
|
2024-10-09 07:38:44 +02:00
|
|
|
logger -t sync_from_remotes "hyperreal-borg successfully synced"
|
2024-10-02 05:29:17 +02:00
|
|
|
|
2024-09-28 00:54:14 +02:00
|
|
|
if ! rsync -avz --delete root@hyperreal.coffee:/home/mastodon/live/public/system/ /mnt/mastodata; then
|
2024-09-23 23:59:45 +02:00
|
|
|
/home/jas/bin/resend_error.py "mastodata"
|
2024-10-09 07:38:44 +02:00
|
|
|
logger -t sync_from_remotes "Error during sync of mastodata"
|
2024-09-23 23:59:45 +02:00
|
|
|
fi
|
|
|
|
|
2024-10-09 07:38:44 +02:00
|
|
|
logger -t sync_from_remotes "mastodata successfully synced"
|
2024-10-02 05:29:17 +02:00
|
|
|
|
2024-10-02 20:39:07 +02:00
|
|
|
if ! rsync -avz --delete root@desktop:/srv/borgbackup/moonshadow/ /mnt/borgbackup/moonshadow; then
|
|
|
|
/home/jas/bin/resend_error.py "moonshadow-borg"
|
2024-10-09 07:38:44 +02:00
|
|
|
logger -t sync_from_remotes "Error during sync of moonshadow-borg"
|
2024-10-02 05:29:17 +02:00
|
|
|
fi
|
|
|
|
|
2024-10-09 07:38:44 +02:00
|
|
|
logger -t sync_from_remotes "moonshadow-borg successfully synced"
|
2024-10-02 05:29:17 +02:00
|
|
|
|
2024-09-23 23:59:45 +02:00
|
|
|
exit 0
|