mirror of
https://codeberg.org/hyperreal/admin-scripts
synced 2024-11-25 09:03:41 +01:00
Add quick-backup
This commit is contained in:
parent
a3c029e2fa
commit
4d8e12b529
6
shell/quick-backup
Normal file
6
shell/quick-backup
Normal 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
|
@ -2,23 +2,6 @@
|
|||||||
|
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
STAGING_DIR="/home/jas/protonshare"
|
rclone sync --transfers 8 -P -u -c --ignore-existing /home/jas/ownCloud/ protondrive:/
|
||||||
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:/
|
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
Loading…
Reference in New Issue
Block a user