Browse Source

minor update

bugfixes
harshadyeola 10 years ago
parent
commit
583b017a42
  1. 8
      src/modules/site/ee_mod_site_backup.sh

8
src/modules/site/ee_mod_site_backup.sh

@ -26,7 +26,11 @@ function ee_mod_site_backup()
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
# Move ee-config.php and wp-config.php
mv $ee_webroot/*-config.php $ee_webroot/backup/htdocs/$EE_DATE/ || ee_lib_error "Unable to move $ee_webroot/*-config.php to backup, exit status =" $?
# Move ee-config.php and copy wp-config.php to backup
if [ -f $ee_webroot/ee-config.php ]
mv $ee_webroot/ee-config.php $ee_webroot/backup/htdocs/$EE_DATE/ || ee_lib_error "Unable to move $ee_webroot/ee-config.php to backup, exit status =" $?
else
cp $ee_webroot/wp-config.php $ee_webroot/backup/htdocs/$EE_DATE/ || ee_lib_error "Unable to move $ee_webroot/ee-config.php to backup, exit status =" $?
fi
fi
}

Loading…
Cancel
Save