summaryrefslogtreecommitdiff
path: root/sandcastle/backup.sh
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2023-12-04 22:00:12 +0100
committerFlorian Dold <florian@dold.me>2023-12-04 22:00:12 +0100
commit294070748042491ea431abb72674e8d5bf8dc433 (patch)
treedf3bbde9ae4eea75d7c455300d81cb651dbb0553 /sandcastle/backup.sh
parentac38198d161f892cd63bf118e3d780096f879c37 (diff)
downloaddeployment-294070748042491ea431abb72674e8d5bf8dc433.tar.gz
deployment-294070748042491ea431abb72674e8d5bf8dc433.tar.bz2
deployment-294070748042491ea431abb72674e8d5bf8dc433.zip
get rid of the legacy sandcastle
Diffstat (limited to 'sandcastle/backup.sh')
-rwxr-xr-xsandcastle/backup.sh42
1 files changed, 0 insertions, 42 deletions
diff --git a/sandcastle/backup.sh b/sandcastle/backup.sh
deleted file mode 100755
index 3ad3972..0000000
--- a/sandcastle/backup.sh
+++ /dev/null
@@ -1,42 +0,0 @@
-#!/bin/bash
-
-set -eu
-
-usage () {
- echo
- echo Usage: ./backup.sh [-h, --help]
- echo
- echo This utility extracts a TAR backup of data and logs
- echo produced by the Taler services running inside this Docker
- echo Compose setup. The backup is saved in /tmp/YYYY-MM-DD-taler-backup.tar
-}
-
-for helpOpt in "-h" "--help"; do
- if test "$helpOpt" = "${1:-}"; then
- usage
- exit 0
- fi
-done
-
-if ! which docker > /dev/null; then
- echo docker not found.
- exit 1
-fi
-
-BACKUP_FILE="/tmp/$(date +%Y-%m-%d)-taler-backup.tar"
-
-if test -a $BACKUP_FILE; then
- echo "Backup file $BACKUP_FILE exists already, please move it and run the script again."
- exit 3
-fi
-
-# 'chown' should still help rootful runs to
-# have the TAR owned by the user invoking the command.
-docker run \
- -v /tmp:/tmp \
- -v demo_talerdata:/taler-data \
- -v demo_talerlogs:/taler-logs \
- -it debian:stable \
- /bin/bash -c "tar --no-same-owner --no-same-permissions -c -f ${BACKUP_FILE} /taler-data /taler-logs" > /dev/null
-
-echo Backup at: ${BACKUP_FILE}