diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2011-09-27 18:25:29 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2011-09-27 18:25:29 -0300 |
commit | 31dc68a7964068df0f99a4d9d6fc7753c3f3597c (patch) | |
tree | 46285d2fb7348ca67f11923ece3073f139a8d86a /share | |
parent | db701044d292d3bce1ca3d6f1df8547fccd978a3 (diff) | |
download | hydra-31dc68a7964068df0f99a4d9d6fc7753c3f3597c.tar.gz hydra-31dc68a7964068df0f99a4d9d6fc7753c3f3597c.tar.bz2 |
Database restoring at backup-restore-site
Diffstat (limited to 'share')
-rwxr-xr-x | share/hydractl/backup-restore-site | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/share/hydractl/backup-restore-site b/share/hydractl/backup-restore-site index d02fb79..15c0d97 100755 --- a/share/hydractl/backup-restore-site +++ b/share/hydractl/backup-restore-site @@ -73,7 +73,12 @@ fi # Restore database if [ -f "$RESTOREDIR/var/backups/mysql/sqldump/$SITE.sql.gz" ]; then + hydra_set_tmpfile $SITE -d + cp $RESTOREDIR/var/backups/mysql/sqldump/$SITE.sql.gz $TMPWORK + ( cd $TMPWORK && gunzip $SITE.sql.gz ) hydra_truncate_database $SITE + mysql $SITE < $TMPWORK.sql + hydra_unset_tmpfile $TMPWORK else echo "Databases should be manually restored" fi |