Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ISPConfig
ISPConfig 3
Commits
7f702ab6
Commit
7f702ab6
authored
Nov 13, 2008
by
tbrehm
Browse files
The update script creates now a database backup in the root folder.
parent
12ea25ff
Changes
1
Hide whitespace changes
Inline
Side-by-side
install/update.php
View file @
7f702ab6
...
...
@@ -143,6 +143,13 @@ if( !empty($conf["mysql"]["admin_password"]) ) {
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'
]));
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment