aboutsummaryrefslogtreecommitdiff
path: root/scripts/box/create-backup.env.sh
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2019-06-05 21:57:28 -0300
committerEuAndreh <eu@euandre.org>2019-06-05 21:57:28 -0300
commit6df3a61c1976f7ce57080ddc530fa800d2ba12c2 (patch)
treefd8aa35db5a38780604f476ba4e1c8306a6dc370 /scripts/box/create-backup.env.sh
parentAdd Ansible to shell derivation (diff)
downloadtoph-6df3a61c1976f7ce57080ddc530fa800d2ba12c2.tar.gz
toph-6df3a61c1976f7ce57080ddc530fa800d2ba12c2.tar.xz
Restore from backup in fresh volume
Diffstat (limited to 'scripts/box/create-backup.env.sh')
-rwxr-xr-xscripts/box/create-backup.env.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/scripts/box/create-backup.env.sh b/scripts/box/create-backup.env.sh
new file mode 100755
index 0000000..c9b2d3d
--- /dev/null
+++ b/scripts/box/create-backup.env.sh
@@ -0,0 +1,14 @@
+#!/usr/bin/env bash
+
+export BORG_REMOTE_PATH="${BORG_REMOTE_PATH}"
+export BORG_PASSPHRASE="${BORG_PASSPHRASE}"
+# The configured $BORG_REPO is already the rsync remote.
+# No need to send the files after the backup is done.
+echo xiu
+borg create \
+ --verbose \
+ --stats \
+ --progress \
+ --compression lzma,6 \
+ "${BORG_REPO}::{hostname}-{now}-${VPS_COMMIT_SHA}" \
+ ${VOLUME_HOME}/*