aboutsummaryrefslogtreecommitdiff
path: root/share/hydractl/backup-restore-mail
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2012-06-30 11:45:50 -0300
committerSilvio Rhatto <rhatto@riseup.net>2012-06-30 11:45:50 -0300
commite684dc31d6ec89f2eee7167d82417c00f10a27aa (patch)
tree0d5eb91e20fd7dee463c62450444694d54162511 /share/hydractl/backup-restore-mail
parent54a00cbf18398a0e4789671293c432d40b6b424f (diff)
downloadhydra-e684dc31d6ec89f2eee7167d82417c00f10a27aa.tar.gz
hydra-e684dc31d6ec89f2eee7167d82417c00f10a27aa.tar.bz2
Restore roundcube database
Diffstat (limited to 'share/hydractl/backup-restore-mail')
-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