From 933338fda7148c3cb02972d0759e1542f1e91efe Mon Sep 17 00:00:00 2001 From: harshadyeola Date: Thu, 9 Oct 2014 16:15:42 +0530 Subject: [PATCH] database backup code updated --- src/modules/site/ee_mod_site_backup.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/modules/site/ee_mod_site_backup.sh b/src/modules/site/ee_mod_site_backup.sh index b1201e5c..408813c6 100644 --- a/src/modules/site/ee_mod_site_backup.sh +++ b/src/modules/site/ee_mod_site_backup.sh @@ -24,7 +24,8 @@ function ee_mod_site_backup() if [ -f $(grep root /etc/nginx/sites-available/$EE_DOMAIN | awk '{ print $2 }' | sed 's/;//g' | sed 's/htdocs/*-config.php/') ]; then ee_lib_echo "Creating Database backup for $EE_DOMAIN before updating ..." local ee_db_name=$(grep DB_NAME $(grep root /etc/nginx/sites-available/$EE_DOMAIN | awk '{ print $2 }' | sed 's/;//g' | sed 's/htdocs/*-config.php/' 2> /dev/null) | cut -d"'" -f4) - mysqldump $ee_db_name > $ee_webroot/backup/db/${ee_db_name}-$EE_DATE.sql.bak &>> $EE_COMMAND_LOG + mysqldump $ee_db_name > $ee_webroot/backup/db/${ee_db_name}-$EE_DATE.sql.bak \ + || ee_lib_error "Unable to dump ${ee_db_name}, exit status =" $? # Move ee-config.php and copy wp-config.php to backup if [ -f $ee_webroot/ee-config.php ]; then