From 8eccdeacde1bc57951fca43e5242cb1df3f3712e Mon Sep 17 00:00:00 2001
From: tbrehm <t.brehm@ispconfig.org>
Date: Wed, 26 May 2010 08:57:33 -0400
Subject: [PATCH] Merged revisions 1673,1676-1679 from trunk.

---
 install/update.php |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/install/update.php b/install/update.php
index 00a9b1d..0b1e263 100644
--- a/install/update.php
+++ b/install/update.php
@@ -142,13 +142,15 @@
 //** export the current database data
 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 --all --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 {
 
-	system("mysqldump -h '".$conf['mysql']['host']."' -u '".$conf['mysql']['admin_user']."' -c -t --add-drop-table --all --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']);
 }
 
+if(filesize('existing_db.sql') < 30000) die('Possible problem with dumping the database. We will stop here. Please check the file existing_db.sql');
+
 // create a backup copy of the ispconfig database in the root folder
 $backup_db_name = '/root/ispconfig_db_backup_'.@date('Y-m-d_h-i').'.sql';
 copy('existing_db.sql',$backup_db_name);

--
Gitblit v1.9.1