mirror of
https://codeberg.org/hyperreal/admin-scripts
synced 2024-11-25 09:03:41 +01:00
30 lines
954 B
Bash
Executable File
30 lines
954 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
# If the -q (quiet) flag is supplied, send all output to /dev/null.
|
|
if [[ "$1" == "-q" ]]; then
|
|
exec >/dev/null 2>&1
|
|
fi
|
|
|
|
if ! kbackup --verbose --autobg /home/jas/documents/default.kbp; then
|
|
logger -t sync_to_remotes -s "Error running kbackup"
|
|
/usr/local/bin/resend_status.py sync_to_remotes err
|
|
exit 1
|
|
fi
|
|
|
|
if ! rclone sync --transfers 8 -P /home/jas/sync_to_remotes/ protondrive:/desktop-backups/ ; then
|
|
logger -t sync_to_remotes -s "Error running rclone for protondrive remote"
|
|
/usr/local/bin/resend_status.py sync_to_remotes err
|
|
exit 1
|
|
fi
|
|
|
|
if ! rclone sync --transfers 8 -P /home/jas/sync_to_remotes/ wasabi:/desktop-backups-rep/ ; then
|
|
logger -t sync_to_remotes -s "Error running rclone for wasabi remote"
|
|
/usr/local/bin/resend_status.py sync_to_remotes err
|
|
exit 1
|
|
fi
|
|
|
|
logger -t sync_to_remotes "sync_to_remotes ran successfully"
|
|
/usr/local/bin/resend_status.py sync_to_remotes ok
|
|
|
|
exit 0
|