ftimme
2013-09-10 29ac6465a048fbe9c29ee6cc3231fa3347b9bf80
- Make sure tar backups are not deleted because of a return value of 1; tar can return 1 because of harmless warnings but still produces valid backups.
1 files modified
2 ■■■ changed files
server/cron_daily.php 2 ●●● patch | view | raw | blame | history
server/cron_daily.php
@@ -1135,7 +1135,7 @@
                    $web_backup_file = 'web'.$web_id.'_'.date('Y-m-d_H-i').'.tar.gz';
                    exec('tar pczf '.escapeshellarg($web_backup_dir.'/'.$web_backup_file).' --exclude=backup\* --directory '.escapeshellarg($web_path).' .', $tmp_output, $retval);
                }
                if($retval == 0){
                if($retval == 0 || $backup_mode != 'userzip'){ // tar can return 1 (due to harmless warings) and still create valid backups
                    chown($web_backup_dir.'/'.$web_backup_file, 'root');
                    chgrp($web_backup_dir.'/'.$web_backup_file, 'root');
                    chmod($web_backup_dir.'/'.$web_backup_file, 0750);