Commit bbbc5a7d authored by tbrehm's avatar tbrehm

Fixed: FS#1928 - web backup to mounted ftp drive - temporary file problem.

parent 5a43e7a2
...@@ -525,8 +525,8 @@ if($backup_dir != '') { ...@@ -525,8 +525,8 @@ if($backup_dir != '') {
if($backup_mode == 'userzip') { if($backup_mode == 'userzip') {
//* Create a .zip backup as web user and include also files owned by apache / nginx user //* Create a .zip backup as web user and include also files owned by apache / nginx user
$web_backup_file = 'web'.$web_id.'_'.date('Y-m-d_H-i').'.zip'; $web_backup_file = 'web'.$web_id.'_'.date('Y-m-d_H-i').'.zip';
exec('cd '.escapeshellarg($web_path).' && sudo -u '.escapeshellarg($web_user).' find . -group '.escapeshellarg($web_group).' -print 2> /dev/null | zip --exclude=backup\* --symlinks '.escapeshellarg($web_backup_dir.'/'.$web_backup_file).' -@'); exec('cd '.escapeshellarg($web_path).' && sudo -u '.escapeshellarg($web_user).' find . -group '.escapeshellarg($web_group).' -print 2> /dev/null | zip -b /tmp --exclude=backup\* --symlinks '.escapeshellarg($web_backup_dir.'/'.$web_backup_file).' -@');
exec('cd '.escapeshellarg($web_path).' && sudo -u '.escapeshellarg($web_user).' find . -user '.escapeshellarg($http_server_user).' -print 2> /dev/null | zip --exclude=backup\* --update --symlinks '.escapeshellarg($web_backup_dir.'/'.$web_backup_file).' -@'); exec('cd '.escapeshellarg($web_path).' && sudo -u '.escapeshellarg($web_user).' find . -user '.escapeshellarg($http_server_user).' -print 2> /dev/null | zip -b /tmp --exclude=backup\* --update --symlinks '.escapeshellarg($web_backup_dir.'/'.$web_backup_file).' -@');
} else { } else {
//* Create a tar.gz backup as root user //* Create a tar.gz backup as root user
$web_backup_file = 'web'.$web_id.'_'.date('Y-m-d_H-i').'.tar.gz'; $web_backup_file = 'web'.$web_id.'_'.date('Y-m-d_H-i').'.tar.gz';
......
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