Change to sync_to_remotes

This commit is contained in:
Jeffrey Serio 2024-10-09 00:36:12 -05:00
parent 81b22f8e7f
commit d911b9964f
2 changed files with 25 additions and 20 deletions

View File

@ -1,20 +0,0 @@
#!/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_protondrive -s "Error running kbackup"
exit 1
fi
if ! rclone sync --transfers 8 -P /home/jas/sync_to_protondrive/ protondrive: ; then
logger -t sync_to_protondrive -s "Error running rclone"
exit 1
fi
logger -t sync_to_protondrive "sync_to_protondrive ran successfully"
exit 0

25
sync_to_remotes Executable file
View File

@ -0,0 +1,25 @@
#!/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"
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"
exit 1
fi
if ! rclone sync --transfers 8 -P /home/jas/sync_to_remotes/ wasabi:/moonshadow-desktop/ ; then
logger -t sync_to_remotes -s "Error running rclone for wasabi remote"
exit 1
fi
logger -t sync_to_remotes "sync_to_remotes ran successfully"
exit 0