tbrehm
2008-11-13 7f702ab67f1fc14436b21fc8727180b065aeaa4b
The update script creates now a database backup in the root folder.
1 files modified
7 ■■■■■ changed files
install/update.php 7 ●●●●● patch | view | raw | blame | history
install/update.php
@@ -143,6 +143,13 @@
    system("mysql -h ".$conf['mysql']['host']." -u ".$conf['mysql']['admin_user']." ".$conf['mysql']['database']." < 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').'.sql';
copy('existing_db.sql',$backup_db_name);
exec("chmod 700 $backup_db_name");
exec("chown root:root $backup_db_name");
//** Update server ini
$tmp_server_rec = $inst->db->queryOneRecord("SELECT config FROM server WHERE server_id = ".$conf['server_id']);
$old_ini_array = ini_to_array(stripslashes($tmp_server_rec['config']));