Thomas Waldmann
d2cc167afd
borg transfer: drop part files
2023-02-01 13:04:19 +01: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
0fed44110a
remove part files from final archive
...
checkpoint archives might have a single, incomplete part file as last item.
part files are always a prefix of the full file, growing in size from
checkpoint to checkpoint.
we now manage the archive items metadata stream in a special way:
- checkpoint archive A(n) might end with a partial item PI(n)
- checkpoint archive A(n+1) does not contain PI(n)
- checkpoint archive A(n+1) contains a new partial item PI(n+1)
- the final archive does not contain any partial items
2023-02-01 13:04:12 +01:00
TW
4515884af5
Merge pull request #7314 from ThomasWaldmann/newer-black
...
use latest "black"
2023-02-01 13:02:41 +01:00
Thomas Waldmann
a0330d578e
run black 23.1.0 on the code
2023-02-01 12:30:37 +01:00
Thomas Waldmann
96862787db
upgrade black to 23.1.0
...
work around the current github actions issue by just using the latest version:
https://github.com/psf/black/issues/3538
2023-02-01 12:29:54 +01:00
Michael Deyaso
8af9eb47c2
Added date-matching support for list_considering ( #7306 )
...
added date-matching support for list_considering, fixes #7296
Co-authored-by: Michael Deyaso <mdeyaso@fusioniq.io>
2023-02-01 11:32:53 +01:00
TW
8046d6f575
Merge pull request #7311 from ThomasWaldmann/fix-mac-birthtime-test-fail
...
tests: relax birthtime assertion, fixes #7308
2023-02-01 11:25:55 +01:00
Thomas Waldmann
e019487166
tests: relax birthtime assertion, fixes #7308
2023-02-01 01:59:41 +01:00
TW
d0344cb8f8
Merge pull request #7305 from ThomasWaldmann/volume-based-checkpointing
...
volume based checkpointing, fix item_ptrs orphaned chunks
2023-01-31 16:48:49 +01:00
TW
2472b1c63f
Merge pull request #7303 from ThomasWaldmann/fix-pyi
...
mypy inspired fixes / updates
2023-01-31 15:46:20 +01:00
Thomas Waldmann
15d1bc0c49
fix checkpointing: add item_ptrs chunks cleanup
...
not having this had created orphaned item_ptrs chunks for checkpoint archives.
also:
- borg check: show id of orphaned chunks
- borg check: archive list with explicit consider_checkpoints=True (this is the default, but better make sure).
2023-01-31 14:40:41 +01:00
Thomas Waldmann
7e31fab754
cleanup: remove Archive.checkpoint_interval (not used)
...
checkpoint_interval and checkpoint_volume are only needed for
the ChunksProcessor.
2023-01-31 04:01:39 +01:00
Thomas Waldmann
56b6f1d2e0
create/recreate/import-tar: add --checkpoint-volume option
...
volume based checkpointing is easier to test than its time based cousin.
also added first checkpointing test.
2023-01-31 04:01:37 +01:00
Thomas Waldmann
2705ccb59b
key storage: type hints / cleanup
2023-01-30 18:08:05 +01:00
Thomas Waldmann
360cd8488f
micro-opt: construct borg1_header_fmt Struct only once
2023-01-30 17:56:05 +01:00
Thomas Waldmann
e772d70e05
cleaner FileLikeWrapper with own __init__
2023-01-30 15:54:56 +01:00
Thomas Waldmann
9740767449
fix bug in obfuscated data upgrade code
2023-01-30 15:54:54 +01:00
Thomas Waldmann
f9078ebfa9
FlexiKey: define STORAGE in base class
...
avoids some mypy warnings.
2023-01-30 15:54:52 +01:00
Thomas Waldmann
a863249394
fs.py: fix bug in f-string - thanks mypy!
2023-01-30 15:54:50 +01:00
Thomas Waldmann
90a9a124d4
*.pyi: fix types, add missing attrs
2023-01-30 15:54:48 +01:00
TW
77977d988a
Merge pull request #7295 from ThomasWaldmann/refactor
...
refactor / cosmetic changes / help improved
2023-01-23 15:58:56 +01:00
Thomas Waldmann
5b28674a99
--newer/older/newest/oldest: rephrase help a bit
2023-01-23 15:27:27 +01:00
Thomas Waldmann
61904dd683
ArchiveChecker.check: reorder args, make most kwargs-only
2023-01-23 15:18:11 +01:00
Thomas Waldmann
60ebd1d2b0
Archives.list: reorder args
2023-01-23 15:11:53 +01:00
Michael Deyaso
b2654bc17d
Support for date-based matching during archive listing ( #7272 )
...
check --archives: add --newer/--older/--newest/--oldest, fixes #7062
Options accept a timespan, like Nd for N days or Nm for N months.
Use these to do date-based matching on archives and only check some of them,
like: borg check --archives --newer=1m --newest=7d
Author: Michael Deyaso <mdeyaso@fusioniq.io>
2023-01-23 15:00:05 +01:00
TW
73e0f8b6b8
Merge pull request #7289 from ThomasWaldmann/command_line-one-str
...
ArchiveItem.cmdline list-of-str -> .command_line str, fixes #7246
2023-01-22 14:12:21 +01:00
Thomas Waldmann
bf667170a7
ArchiveItem.cmdline list-of-str -> .command_line str, fixes #7246
...
Same change for .recreate_cmdline -> .recreate_command_line .
JSON output key "command_line":
borg 1.x: sys.argv [list of str]
borg 2: shlex.join(sys.argv) [str]
2023-01-20 00:19:00 +01:00
TW
ccbfc4ee95
Merge pull request #7287 from ThomasWaldmann/fix-get-item-uid-gid-win32
...
fix some uid/gid lookup code / tests for win32
2023-01-19 21:48:47 +01:00
TW
4a94097193
Merge pull request #7288 from ThomasWaldmann/host-user-group-names-encoding
...
hostname / username encoding
2023-01-19 21:48:28 +01:00
Thomas Waldmann
249189e04e
refactor: reuse code from remove_surrogates
2023-01-19 20:58:58 +01:00
Thomas Waldmann
b3da7d0e72
make sure hostname and username have no surrogate escapes
...
if they are present, process them through json_text().
this replaces s-e by "?" for the key and puts the binary
representation into key_b64, if needed.
likely this is rarely needed.
2023-01-19 20:46:40 +01:00
Thomas Waldmann
7ab39f9d42
make the user2uid/group2gid win32 hack behave more like the real code (e.g. posix)
...
The code relies on them returning the default value (usually
None), if we call user2uid(None) or group2gid(None) (same for
empty string).
2023-01-19 20:07:38 +01:00
Thomas Waldmann
7bd8e924eb
win32: omit some tests with non-existing user/group names
...
see comment in the code, they currently can't succeed.
2023-01-19 20:07:37 +01:00
TW
d090826a37
Merge pull request #7285 from ThomasWaldmann/display-localtime
...
use local time / local timezone to output timestamps, fixes #7283
2023-01-19 18:38:16 +01:00
Thomas Waldmann
9460da42d1
use local time / local timezone to output timestamps, fixes #7283
...
"ls" and also "tar" show timestamps as local time.
borg now does the same, but also shows the local tzoffset.
this also affects JSON output.
2023-01-19 03:36:46 +01:00
TW
be1048abfe
Merge pull request #7277 from jdchristensen/chunks-cache-output
...
cache.py: be less verbose during cache sync
2023-01-19 02:45:50 +01:00
TW
48122f9b8b
Merge pull request #7279 from ThomasWaldmann/os-replace-master
...
use os.replace
2023-01-19 02:45:09 +01:00
Thomas Waldmann
1843990172
use os.replace rather than os.rename
...
more consistent behaviour on all OSes, incl. windows.
2023-01-19 01:57:03 +01:00
TW
8e012be3fa
Merge pull request #7264 from ThomasWaldmann/fix-locking-win32-master
...
Fix locking (win32, master)
2023-01-19 01:56:20 +01:00
Dan Christensen
530bd4c298
cache.py: consistenly use "chunks index"
2023-01-18 19:51:01 -05:00
TW
57e0579cf8
Merge pull request #7284 from ThomasWaldmann/prune-in-localtime
...
fix prune tests, prune in localtime
2023-01-19 01:31:49 +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
0e577452c2
tests: fix prune_split tests by giving the timestamps in local timezone
...
Guess this fixes issues like #5535 .
I tested this with TZ=:
- UTC
- UTC+12
- UTC-12
- UTC+14
- UTC-14
2023-01-19 00:52:27 +01:00
Dan Christensen
6f7bc89627
cache.py: minor updates to output
2023-01-18 16:59:44 -05:00
Thomas Waldmann
8a2fd39212
Revert "prune: compute pruning in utc timezone"
...
This reverts commit 860a48049b
.
2023-01-18 22:41:40 +01:00
TW
4664176e87
Merge pull request #7282 from ThomasWaldmann/prune-in-utc
...
prune: compute pruning in utc timezone
2023-01-18 18:58:09 +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
TW
c8fe49dcb7
Merge pull request #7276 from ThomasWaldmann/symlink-target
...
Item: symlinks: rename .source to .target, fixes #7245
2023-01-18 17:05:25 +01:00
TW
0fa2506b92
Merge pull request #7280 from ThomasWaldmann/shellpattern-license-master
...
shellpattern: add license, use copyright/license markup
2023-01-18 16:46:22 +01:00