Add quick-backup

This commit is contained in:
Jeffrey Serio 2024-11-23 21:19:18 -06:00
parent a3c029e2fa
commit 4d8e12b529
2 changed files with 7 additions and 18 deletions

6
shell/quick-backup Normal file
View File

@ -0,0 +1,6 @@
#!/usr/bin/env bash
if ! kbackup --verbose --autobg /home/jas/ownCloud/documents/quickbackup.kbp; then
echo "Error running kbackup"
exit 1
fi

View File

@ -2,23 +2,6 @@
set -euo pipefail
STAGING_DIR="/home/jas/protonshare"
SHARE_DIRS=(
/home/jas/calibre-library
/home/jas/documents
/home/jas/ebooks
/home/jas/org
/home/jas/org-roam
/home/jas/pictures
)
rm -rf "${STAGING_DIR}"
mkdir -p "${STAGING_DIR}"
for dir in "${SHARE_DIRS[@]}"; do
cp -rfv "$dir" "${STAGING_DIR}/"
done
rclone sync --transfers 8 -P -u -c --ignore-existing "${STAGING_DIR:?}/" protondrive:/
rclone sync --transfers 8 -P -u -c --ignore-existing /home/jas/ownCloud/ protondrive:/
exit 0