mirror of
https://github.com/kevinveenbirkenbach/docker-volume-backup.git
synced 2026-09-23 21:23:19 +00:00
fix(backup): let the stopped copy replace a failed live pre-copy
A volume whose containers must stop was copied twice: live first, then with the containers stopped and --checksum. A live writer that truncates a file under rsync (read errors mapping ...: No data available (61), exit 23) aborted the run in the first pass, before the containers were stopped, although the second pass rewrites every differing file anyway. Seen in infinito-nexus CI on kix_kix_shared/objecticons. The live copy now only warns when a stopped copy follows. Without a stop it stays the only copy and still fails the run, and a failing stopped copy still fails it. The e2e test drives a writer that shrinks files mid-read; without the fix it reproduces the CI failure verbatim. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -25,7 +25,7 @@ def backup_run(
|
||||
images_no_stop_required: list[str],
|
||||
images_no_backup_required: list[str] | None = None,
|
||||
only_sql: bool = False,
|
||||
) -> None:
|
||||
) -> subprocess.CompletedProcess:
|
||||
cmd = [
|
||||
"baudolo",
|
||||
"--compose-dir",
|
||||
@@ -49,7 +49,7 @@ def backup_run(
|
||||
cmd += ["--only-sql"]
|
||||
|
||||
try:
|
||||
run(cmd, capture=True, check=True)
|
||||
return run(cmd, capture=True, check=True)
|
||||
except subprocess.CalledProcessError as e:
|
||||
print(">>> baudolo failed (exit code:", e.returncode, ")")
|
||||
if e.stdout:
|
||||
|
||||
Reference in New Issue
Block a user