Skip to content

Commit

Permalink
* Fix scanned source files with spaces in it
Browse files Browse the repository at this point in the history
* Output a bit more debug info for not stopped containers.
  • Loading branch information
Commifreak committed Dec 8, 2022
1 parent e03d46b commit 246be8b
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,8 @@ function backupLog($msg, $newLine = true, $skipDate = false)
backupLog("done! (took " . (time() - $stopTimer) . " seconds)", true, true);
}

} else {
backupLog("Not stopping {$docker['Name']}: Not started! [{$docker['Paused']} / {$docker['Status']}]");
}
}
}
Expand Down Expand Up @@ -225,7 +227,7 @@ function backupLog($msg, $newLine = true, $skipDate = false)
// Ignore . and .. and excluded folders
continue;
}
$commands[$srcFolderEntry] = "cd " . escapeshellarg($source) . " && /usr/bin/tar $rsyncExcluded -caf " . escapeshellarg("{$destination}/CA_backup_$srcFolderEntry$fileExt") . " $srcFolderEntry >> {$communityPaths['backupLog']} 2>&1 & echo $! > {$communityPaths['backupProgress']} && wait $!";
$commands[$srcFolderEntry] = "cd " . escapeshellarg($source) . " && /usr/bin/tar $rsyncExcluded -caf " . escapeshellarg("{$destination}/CA_backup_$srcFolderEntry$fileExt") . " ".escapeshellarg($srcFolderEntry)." >> {$communityPaths['backupLog']} 2>&1 & echo $! > {$communityPaths['backupProgress']} && wait $!";
}
} else {
backupLog("Separate archives disabled! Saving into one file.");
Expand Down Expand Up @@ -459,7 +461,7 @@ function backupLog($msg, $newLine = true, $skipDate = false)
if (!$restore) {
if ($backupOptions['deleteOldBackup'] && !$missingSource) {
if ($errorOccured) {
backupLog("A error occured somewhere. Not deleting old backup sets of appdata");
backupLog("A error occurred somewhere. Not deleting old backup sets of appdata");
exec("mv " . escapeshellarg($destination) . " " . escapeshellarg("$destination-error"));
} else {
$currentDate = date_create("now");
Expand Down

0 comments on commit 246be8b

Please sign in to comment.