jrcarlsen
Forum Replies Created
-
I removed it from the if statement like this:
$value = $zip->create( $itsec_globals['ithemes_backup_dir'] . '/' . $file . '.sql' ); file_put_contents($debugfile, "zip->create: $value\n", FILE_APPEND | LOCK_EX); if ( $value != 0 ) { file_put_contents($debugfile, "mark_4\n", FILE_APPEND | LOCK_EX); //delete .sql and keep zip @unlink( $itsec_globals['ithemes_backup_dir'] . '/' . $file . '.sql' ); $fileext = '.zip'; }My debug line was never called, so I assume the script got terminated in $zip->create
Increasing PHP’s memory_limit fixed the issue.
This command never returns:
$zip->create( $itsec_globals['ithemes_backup_dir'] . '/' . $file . '.sql' );Ok, so I just ran the manual backup and it seems to work both with and without zip compression.
Manual run:
-rw-r--r-- 1 apache apache 4861954 Feb 10 16:17 backup-tc-1423585049-6pjNeP75.zipScheduled run:
-rw-r--r-- 1 apache apache 40170999 Feb 10 16:19 backup-tc-1423585165-2mflN1M.sql -rw-r--r-- 1 apache apache 0 Feb 10 16:19 backup-tc-1423585165-2mflN1M.zipI’ll keep looking for an easier way to reproduce the issue.
Thanks, I’ll debug the manual backup.
Here are the values you requested earlier:
PHP Memory Usage: 61.09 MB
PHP Memory Limit: 256M
PHP Max Script Execution Time: 300 SecondsI can’t easily trigger a backup from the webinterface, backups are always running.
“Something went wrong with your backup. It looks like another process might already be trying to backup your database. Please try again in a few minutes. If the problem persists please contact support.”
I am still trying to find a good way to debug the code.
memory_limit is set to 160M
memory_get_peak_usage() reports 82MB on dwinden’s testI am seeing the same issue on one of my installations, I’ll see if I can provide more information about what is going wrong.
My .sql files are about 40MB in size, they are generated every 3-5 minutes. Zip is enabled, but the output .zip files are empty.
Dwinden’s zip script completes successfully:
Zip file created successfully.
array(1) {
[0]=>
array(10) {
[“filename”]=>
string(101) “/var/www/html/wp-content/uploads/ithemes-security/backups/backup-tc-1423578796-Pc65FEH.sql”
[“stored_filename”]=>
string(101) “/var/www/html/wp-content/uploads/ithemes-security/backups/backup-tc-1423578796-Pc65FEH.sql”
[“size”]=>
int(40170978)
[“compressed_size”]=>
int(4862009)
[“mtime”]=>
int(1423553597)
[“comment”]=>
string(0) “”
[“folder”]=>
bool(false)
[“index”]=>
int(-1)
[“status”]=>
string(2) “ok”
[“crc”]=>
int(1752657305)
}
}