aboutsummaryrefslogtreecommitdiff
path: root/scripts/backup.sh
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/backup.sh')
-rwxr-xr-xscripts/backup.sh14
1 files changed, 7 insertions, 7 deletions
diff --git a/scripts/backup.sh b/scripts/backup.sh
index a33a630..f31a503 100755
--- a/scripts/backup.sh
+++ b/scripts/backup.sh
@@ -6,12 +6,12 @@
#
if [ ! -d ~/UTCLOUD/ ]; then
- red "~/UTCLOUD not attached. Backup not started."
+ red "$HOME/UTCLOUD not attached. Backup not started."
exit 1
fi
if [ ! -d ~/borgbackup/ ]; then
- yellow "~/borgbackup/ repository doesn't exist. Downloading latest version from ~/UTCLOUD/borg/borgbackup/ into ~/borgbackup/"
+ yellow "$HOME/borgbackup/ repository doesn't exist. Downloading latest version from ~/UTCLOUD/borg/borgbackup/ into ~/borgbackup/"
# The initial borg repo was created with:
# $ borg init --append-only --encryption=keyfile ~/borgbackup
# See also: https://borgbackup.readthedocs.io/en/stable/usage/notes.html#append-only-mode
@@ -27,7 +27,7 @@ borg create \
--progress \
--compression lzma,6 \
~/borgbackup::"{hostname}-{now}-${BACKUP_TAG}" \
- ~/Nextcloud/ \
+ ~/ownCloud/ \
~/mbsync/
# add folders to be backed up here
green "Done"
@@ -46,7 +46,7 @@ green "Done"
#
yellow "Backing up git repos"
-pushd ~/
+pushd ~/ || exit 1
mr -s master
mr -s status
@@ -54,13 +54,13 @@ mr -s -j16 update
mr -s hd
mr -s -j4 rsyncnet
-popd
+popd || exit 1
yellow "Syncing annex"
-pushd ~/annex/
+pushd ~/annex/ || exit 1
git annex sync
-popd
+popd || exit 1
green "Done"