Commit Graph

21 Commits

Author SHA1 Message Date
Vladimir Malinovskii e3f1349a7f changed log message reserved length (42 -> 44) 2024-04-06 18:03:38 +03:00
Vladimir Malinovskii 2e46cde178 changed log message reserved length 2024-03-17 10:11:15 +03:00
Thomas Waldmann abe6545853
do not return the rc from Archiver methods
this is not needed and getting rid of it makes
the code / behaviour simpler to understand:

if a fatal error is detected, we throw an exception.

if we encounter something warning worthy, we emit and collect the warning.

in a few cases, we directly call set_ec to set the
exit code as needed, e.g. if passing it through
from a subprocess.

also:
- get rid of Archiver.exit_code
- assert that return value of archiver methods is None
- fix a print_warning call to use the correct formatting method
2024-02-17 22:07:47 +01:00
Thomas Waldmann 9de07ebd46
update "modern" error RCs (docs and code) 2024-02-13 22:58:02 +01:00
Tarrailt 616d5e7330
Add --format option to `borg diff`, resolve issue #4634 (#7534)
diff: add --format option

also: refactoring/improvements of BaseFormatter
2023-06-11 22:41:36 +02:00
TW 1e1c922298
Merge pull request #7512 from ThomasWaldmann/prune-list-pruned-master
prune --list-kept/--list-pruned, fixes #7511
2023-04-08 17:37:33 +02:00
Thomas Waldmann 02b28882b3
prune --list-kept/--list-pruned, fixes #7511
use this to only list the kept (or pruned) archives.
--list-pruned and --list-kept also work in a additive way.

implied logging: support multiple prune options activating same logger

if any of --list / --list-kept / --list-pruned is used,
it should put the borg.output.list logger to INFO level,
otherwise to WARN level.
2023-04-08 15:40:07 +02:00
Thomas Waldmann 9f4f2b42e3
implement BORG_<CMD>_FORMAT env vars, fixes #5166
for now for: prune, list, rlist.
2023-04-08 00:53:53 +02:00
Thomas Waldmann a0e1110c16
prune --short/--format: enable users to format the list output, fixes #3238 2023-04-07 19:30:22 +02:00
Thomas Waldmann 1aae04e66e
prune: more Highlander options, fixes #6269 2023-04-06 17:10:16 +02:00
Thomas Waldmann 52793be923
pyupgrade --py39-plus ./**/*.py 2023-04-02 02:14:54 +02:00
Thomas Waldmann b92f4aa487
remove --consider-part-files, related stats code, update docs
we now just treat that one .borg_part file we might have inside
checkpoint archives as a normal file.

people can recognize via the file name it is a partial file.

nobody cares for statistics of checkpoint files and the final
archive now does not contain any partial files any more, thus
no needs to maintain statistics about count and size of part
files.
2023-02-01 13:04:18 +01:00
Thomas Waldmann a0330d578e
run black 23.1.0 on the code 2023-02-01 12:30:37 +01:00
Thomas Waldmann 2b1303d280
docs: pruning interprets timestamps in the local timezone where borg prune runs 2023-01-19 01:04:49 +01:00
Thomas Waldmann 8a2fd39212
Revert "prune: compute pruning in utc timezone"
This reverts commit 860a48049b.
2023-01-18 22:41:40 +01:00
Thomas Waldmann 860a48049b
prune: compute pruning in utc timezone
guess this fixes issues like #5535.

i tested this with TZ=:
- UTC
- UTC+1 (my current local timezone)
- UTC+12
- UTC-12
- UTC+14
2023-01-18 18:27:15 +01:00
Thomas Waldmann 8747644540
remove --save-space
this option did not change behaviour since longer,
we only had kept it for API compatibility.

as a borg2 repo server won't have old clients talking to it,
we can safely remove this everywhere now.
2022-12-17 16:48:54 +01:00
Thomas Waldmann 4493d396e6 implement pattern support for --match-archives, fixes #6504
also:
- rename --glob-archives option to --match-archives (short: -a, unchanged)
- globbing patterns now need sh: prefix
- regex patterns need re: prefix
- "identical" match "patterns" use an id: prefix
- new default style is id: pattern (--glob-archives used sh: glob pattern)
- source code: glob -> match, GLOB -> PATTERN
2022-09-16 15:10:13 +02:00
Thomas Waldmann fa986a9f19 repoobj: add a layer to format/parse repo objects
borg < 2:

obj = encrypted(compressed(data))

borg 2:

obj = enc_meta_len32 + encrypted(msgpacked(meta)) + encrypted(compressed(data))

handle compr / decompr in repoobj

move the assert_id call from decrypt to RepoObj.parse

also:
- for AEADKeyBase, add a dummy assert_id (not needed here)
- only test assert_id for other if not AEADKeyBase instance
- remove test_getting_wrong_chunk. assert_id is called elsewhere
  and is not needed any more anyway with the new AEAD crypto.
- only give manifest (includes key, repo, repo_objs)
- only return manifest from Manifest.load (includes key, repo, repo_objs)
2022-09-04 00:49:38 +02:00
Thomas Waldmann 732ecb29fe update prune docs, -P is gone, -a replaces it 2022-08-14 22:01:14 +02:00
Thomas Waldmann 66e74e0471 archiver modules: rename to *_cmd[s]
this was already required for list_cmd (due to "list"
being a builtin), now renamed all else also.
2022-08-13 22:59:48 +02:00
Renamed from src/borg/archiver/prune.py (Browse further)