|
|
@@ -417,19 +417,23 @@ def main(argv: typing.List[str]): |
|
|
|
"--paths-delimiter", "\\0", |
|
|
|
"::" + hostname + "-{now:%Y%m%d-%H%M%S}"], |
|
|
|
stdin_writer=backup.run): |
|
|
|
|
|
|
|
# backup success; run prune. Note that this won't actually free |
|
|
|
# space until a "./borg.sh --rw compact", because we're in |
|
|
|
# append-only mode. |
|
|
|
backup.log('I', f"pruning archives", bold=True) |
|
|
|
backup.run_borg([borg_sh, |
|
|
|
"prune", |
|
|
|
"--verbose", |
|
|
|
"--list", |
|
|
|
"--progress", |
|
|
|
"--log-json", |
|
|
|
"--stats", |
|
|
|
"--keep-within=7d", |
|
|
|
"--keep-daily=14", |
|
|
|
"--keep-weekly=8", |
|
|
|
"--keep-monthly=-1"]) |
|
|
|
"--keep-monthly=-1", |
|
|
|
"--glob-archives", "hostname-????????-??????"]) |
|
|
|
|
|
|
|
# See if we had any errors |
|
|
|
warnings = sum(1 for (letter, msg) in backup.logs if letter == 'W') |
|
|
|