Skip to content
Snippets Groups Projects
Commit b3b8495f authored by tbrehm's avatar tbrehm
Browse files

Use --result-file=existing_db.sql instead of piping the output to a file in the updater.

parent 4240d448
No related branches found
No related tags found
No related merge requests found
...@@ -142,11 +142,11 @@ if(is_file(ISPC_INSTALL_ROOT."/install/sql/pre_update.sql")) { ...@@ -142,11 +142,11 @@ if(is_file(ISPC_INSTALL_ROOT."/install/sql/pre_update.sql")) {
//** export the current database data //** export the current database data
if( !empty($conf["mysql"]["admin_password"]) ) { if( !empty($conf["mysql"]["admin_password"]) ) {
system("mysqldump -h '".$conf['mysql']['host']."' -u '".$conf['mysql']['admin_user']."' -p'".$conf['mysql']['admin_password']."' -c -t --add-drop-table --create-options --quick ".$conf['mysql']['database']." > existing_db.sql"); system("mysqldump -h '".$conf['mysql']['host']."' -u '".$conf['mysql']['admin_user']."' -p'".$conf['mysql']['admin_password']."' -c -t --add-drop-table --create-options --quick --result-file=existing_db.sql ".$conf['mysql']['database']);
} }
else { else {
system("mysqldump -h '".$conf['mysql']['host']."' -u '".$conf['mysql']['admin_user']."' -c -t --add-drop-table --create-options --quick ".$conf['mysql']['database']." > existing_db.sql"); system("mysqldump -h '".$conf['mysql']['host']."' -u '".$conf['mysql']['admin_user']."' -c -t --add-drop-table --create-options --quick --result-file=existing_db.sql ".$conf['mysql']['database']);
} }
// create a backup copy of the ispconfig database in the root folder // create a backup copy of the ispconfig database in the root folder
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment