Skip to content
GitLab
Projects
Groups
Topics
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Register
Sign in
Toggle navigation
Menu
Zvonimir
ISPConfig 3
Commits
9b159814
Commit
9b159814
authored
Apr 17, 2013
by
tbrehm
Browse files
Fixed sql stamement for backup size
parent
a0fd5ab7
Changes
1
Hide whitespace changes
Inline
Side-by-side
server/cron_daily.php
View file @
9b159814
...
...
@@ -938,7 +938,10 @@ if($backup_dir != '') {
//* Insert web backup record in database
//$insert_data = "(server_id,parent_domain_id,backup_type,backup_mode,tstamp,filename) VALUES (".$conf['server_id'].",$web_id,'mysql','sqlgz',".time().",'".$app->db->quote($db_backup_file).".gz')";
//$app->dbmaster->datalogInsert('web_backup', $insert_data, 'backup_id');
$sql
=
"INSERT INTO web_backup (server_id,parent_domain_id,backup_type,backup_mode,tstamp,filename) VALUES ("
.
$conf
[
'server_id'
]
.
",
$web_id
,'mysql','sqlgz',"
.
time
()
.
",'"
.
$app
->
db
->
quote
(
$db_backup_file
)
.
".gz')"
;
// $sql = "INSERT INTO web_backup (server_id,parent_domain_id,backup_type,backup_mode,tstamp,filename) VALUES (".$conf['server_id'].",$web_id,'mysql','sqlgz',".time().",'".$app->db->quote($db_backup_file).".gz')";
$sql
=
"INSERT INTO web_backup (server_id,parent_domain_id,backup_type,backup_mode,tstamp,filename,filesize) VALUES ("
.
$conf
[
'server_id'
]
.
",
$web_id
,'mysql','sqlgz',"
.
time
()
.
",'"
.
$app
->
db
->
quote
(
$db_backup_file
)
.
".gz','"
.
formatBytes
(
filesize
(
$db_backup_dir
.
'/'
.
$db_backup_file
))
.
"')"
;
$app
->
db
->
query
(
$sql
);
if
(
$app
->
db
->
dbHost
!=
$app
->
dbmaster
->
dbHost
)
$app
->
dbmaster
->
query
(
$sql
);
...
...
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