Add stuff

This commit is contained in:
Jeffrey Serio 2024-10-01 22:29:17 -05:00
parent 4f2ce821a3
commit ff5791d414
3 changed files with 30 additions and 6 deletions

View File

@ -33,6 +33,7 @@ mkShell {
python312Packages.isort
python312Packages.pytest
python312Packages.requests
python312Packages.resend
python312Packages.rich
pyright
python-qbittorrent

View File

@ -1,5 +1,8 @@
#!/usr/bin/env bash
set -euo pipefail
# If the -q (quiet) flag is supplied, send all output to /dev/null.
if [[ "$1" == "-q" ]]; then
exec >/dev/null 2>&1
fi
@ -7,22 +10,29 @@ 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"
else
logger -t sync_remotes "hyperreal-borg successfully synced"
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"
else
logger -t sync_remotes "auxnc-96g-borg successfully synced"
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"
else
logger -t sync_remotes "mastodata successfully synced"
fi
logger -t sync_remotes "mastodata successfully synced"
if ! rsync -avz --delete root@desktop:/home/jas/sync-to-protondrive/ /mnt/desktop-data; then
/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"
exit 0

13
sync_to_protondrive Normal file
View File

@ -0,0 +1,13 @@
#!/usr/bin/env bash
if ! flatpak run org.kde.kbackup --auto /home/jas/shared/default.kbp; then
logger -t backup_home -s "Error running kbackup"
exit 1
fi
if ! /home/jas/.local/bin/rclone sync --transfers 8 /home/jas/sync-to-protondrive/ protondrive: ; then
logger -t backup_home -s "Error running rclone"
exit 1
fi
exit 0