mirror of
https://codeberg.org/hyperreal/admin-scripts
synced 2024-11-25 09:03:41 +01:00
39 lines
1.3 KiB
Bash
Executable File
39 lines
1.3 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
set -eo pipefail
|
|
|
|
# If the -q (quiet) flag is supplied, send all output to /dev/null.
|
|
if [[ "$1" == "-q" ]]; then
|
|
exec >/dev/null 2>&1
|
|
fi
|
|
|
|
if ! rsync -avz --delete root@hyperreal.coffee:/srv/borgbackup/hyperreal/ /mnt/borgbackup/hyperreal; then
|
|
/home/jas/bin/resend_error.py "hyperreal-borg"
|
|
logger -t sync_remotes "Error during sync of hyperreal-borg"
|
|
fi
|
|
|
|
logger -t sync_remotes "hyperreal-borg successfully synced"
|
|
|
|
if ! rsync -avz --delete root@auxnc-96g:/srv/backup/auxnc-96g/ /mnt/borgbackup/auxnc-96g; then
|
|
/home/jas/bin/resend_error.py "auxnc-96g-borg"
|
|
logger -t sync_remotes "Error during sync of auxnc-96g-borg"
|
|
fi
|
|
|
|
logger -t sync_remotes "auxnc-96g-borg successfully synced"
|
|
|
|
if ! rsync -avz --delete root@hyperreal.coffee:/home/mastodon/live/public/system/ /mnt/mastodata; then
|
|
/home/jas/bin/resend_error.py "mastodata"
|
|
logger -t sync_remotes "Error during sync of mastodata"
|
|
fi
|
|
|
|
logger -t sync_remotes "mastodata successfully synced"
|
|
|
|
if ! rsync -avz --delete root@desktop:/srv/borgbackup/moonshadow/ /mnt/borgbackup/moonshadow; then
|
|
/home/jas/bin/resend_error.py "moonshadow-borg"
|
|
logger -t sync_remotes "Error during sync of moonshadow-borg"
|
|
fi
|
|
|
|
logger -t sync_remotes "moonshadow-borg successfully synced"
|
|
|
|
exit 0
|