summaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
Diffstat (limited to 'share')
-rwxr-xr-xshare/hydractl/backup-restore-mail4
1 files changed, 4 insertions, 0 deletions
diff --git a/share/hydractl/backup-restore-mail b/share/hydractl/backup-restore-mail
index a515584..30cc42f 100755
--- a/share/hydractl/backup-restore-mail
+++ b/share/hydractl/backup-restore-mail
@@ -25,6 +25,7 @@ DATE="`date +%Y%m%d`"
HOST="$1"
SERVICE="mail"
SERVICE_DIR="/var/mail/virtual"
+DATABASE_DIR="/var/lib/dbconfig-common/sqlite/roundcube"
SERVICE_USER="vmail"
SERVICE_GROUP="vmail"
@@ -44,6 +45,9 @@ for folder in `ls $RESTOREDIR/$SERVICE_DIR`; do
fi
done
+# Restore database.
+rsync -av $RESTOREDIR/$DATABASE_DIR/ $DATABASE_DIR/
+
# Fix permissions.
chown -R $SERVICE_USER.$SERVICE_GROUP $SERVICE_DIR