Skip to content

Commit 90de677

Browse files
author
Marius Burkard
committed
Merge branch 'feature/improved-userzip' into 'stable-3.1'
Improved backup in `userzip` mode See merge request ispconfig/ispconfig3!976
2 parents 3c8d69d + df33e63 commit 90de677

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

server/lib/classes/cron.d/500-backup.inc.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -132,9 +132,7 @@ public function onRunJob() {
132132
if($backup_mode == 'userzip') {
133133
//* Create a .zip backup as web user and include also files owned by apache / nginx user
134134
$web_backup_file = 'web'.$web_id.'_'.date('Y-m-d_H-i').'.zip';
135-
$app->system->exec_safe('cd ? && sudo -u ? find . -group ? -print 2> /dev/null | zip -b ? --exclude=./backup\*'.$backup_excludes.' --symlinks ? -@', $web_path, $web_user, $web_group, $backup_tmp, $web_backup_dir.'/'.$web_backup_file);
136-
$retval = $app->system->last_exec_retcode();
137-
if($retval == 0 || $retval == 12) $app->system->exec_safe('cd ? && sudo -u ? find . -user ? -print 2> /dev/null | zip -b ? --exclude=./backup\*'.$backup_excludes.' --update --symlinks ? -@', $web_path, $web_user, $http_server_user, $backup_tmp, $web_backup_dir.'/'.$web_backup_file);
135+
$app->system->exec_safe('cd ? && sudo -u ? find . -group ? -or -user ? -print 2> /dev/null | zip -b ? --exclude=./backup\*'.$backup_excludes.' --symlinks ? -@', $web_path, $web_user, $web_group, $http_server_user, $backup_tmp, $web_backup_dir.'/'.$web_backup_file);
138136
$retval = $app->system->last_exec_retcode();
139137
} else {
140138
//* Create a tar.gz backup as root user

0 commit comments

Comments
 (0)