diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2011-09-27 18:07:24 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2011-09-27 18:07:24 -0300 |
commit | 9330113df08676ec82639aec8cca290709b7936e (patch) | |
tree | 93600833840c1d0f6d7420511335bf12bfc51195 /share/hydractl/backup-restore-site | |
parent | c040869beb026ecc309bf1c2ccf627261f41bc46 (diff) | |
download | hydra-9330113df08676ec82639aec8cca290709b7936e.tar.gz hydra-9330113df08676ec82639aec8cca290709b7936e.tar.bz2 |
Action backup-site now dumping db and storing things in the right place
Diffstat (limited to 'share/hydractl/backup-restore-site')
-rwxr-xr-x | share/hydractl/backup-restore-site | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/share/hydractl/backup-restore-site b/share/hydractl/backup-restore-site index 16ebf93..d02fb79 100755 --- a/share/hydractl/backup-restore-site +++ b/share/hydractl/backup-restore-site @@ -60,7 +60,6 @@ fi # Site if [ -e "$FOLDER/site" ]; then chown -R $SITE.$SITE $FOLDER/site - echo "Databases should be manually restored" fi # Drupal @@ -71,3 +70,10 @@ if [ -e "$FOLDER/drupal" ]; then chown root.$SITE $FOLDER/drupal/settings.php chmod 640 $FOLDER/drupal/settings.php fi + +# Restore database +if [ -f "$RESTOREDIR/var/backups/mysql/sqldump/$SITE.sql.gz" ]; then + hydra_truncate_database $SITE +else + echo "Databases should be manually restored" +fi |