From 653de900c8e80fdee95f5ac1c70fc8029cf92520 Mon Sep 17 00:00:00 2001 From: Claudiu Cristea Date: Mon, 2 Jan 2023 19:46:52 +0200 Subject: [PATCH] Make backup dir configurable --- virtuoso.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/virtuoso.sh b/virtuoso.sh index 4c86d1b..c426213 100644 --- a/virtuoso.sh +++ b/virtuoso.sh @@ -34,10 +34,11 @@ then echo "Finished converting environment variables to ini file" fi -if [ ! -f ".backup_restored" -a -d "backups" -a ! -z "$BACKUP_PREFIX" ] ; +BACKUP_DIR=${BACKUP_DIR:-backups} +if [ ! -f ".backup_restored" -a -d "$BACKUP_DIR" -a ! -z "$BACKUP_PREFIX" ] ; then echo "Start restoring a backup with prefix $BACKUP_PREFIX" - cd backups + cd $BACKUP_DIR virtuoso-t +restore-backup $BACKUP_PREFIX +configfile /data/virtuoso.ini if [ $? -eq 0 ]; then cd /data