Commit 423b1d75 authored by tbrehm's avatar tbrehm
Browse files

Added a filesize check for existing_db.sql in updater to stop update process...

Added a filesize check for existing_db.sql in updater to stop update process if the expoerted database dump is smaller then about 60 KB.
parent b3b8495f
......@@ -149,6 +149,8 @@ else {
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') < 60000) 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);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment