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
Thomas Waldmann
88b9868159
shellpattern: add license, use copyright/license markup
2023-01-18 15:45:13 +01:00
Helmut Grohne
f2f761212d
update bash completion script commands and options ( #7273 )
...
update bash completion script commands and options
2023-01-18 14:10:29 +01:00
Thomas Waldmann
c3d0c525f9
locking: get out of kill_stale_lock more quickly if directory does not exist.
2023-01-18 13:44:51 +01:00
Thomas Waldmann
9ba249b482
use for loop
2023-01-18 13:42:39 +01:00
Dan Christensen
7dad4a6992
cache.py: be less verbose during cache sync
2023-01-17 15:21:18 -05:00
Thomas Waldmann
1672aee031
Item: symlinks: rename .source to .target, fixes #7245
...
Also, in JSON:
- rename "linktarget" to "target" for symlinks
- remove "source" for symlinks
2023-01-16 20:28:25 +01:00
TW
1df7c244c4
Merge pull request #7270 from ThomasWaldmann/user-group-uid-gid
...
make user/group/uid/gid optional
2023-01-16 18:53:15 +01:00
TW
9b067fd1f7
Merge pull request #7275 from ThomasWaldmann/docs-key-change-passphrase
...
key change-passphrase: fix --encryption value in examples
2023-01-16 18:18:06 +01:00
Thomas Waldmann
18898d68f0
export-tar: for items w/o uid/gid, default to 0/0, see #7249
2023-01-16 18:17:17 +01:00
Thomas Waldmann
ff545033e3
tests: do not look up uid 0 / gid 0, but current process uid/gid
...
some systems do not have uid/gid 0 (windows).
2023-01-16 18:17:15 +01:00
Thomas Waldmann
4dcc48f5c4
extract: chown only if we have u/g info in archived item, see #7249
...
also: move get_item_uid_gid() to "not is_win32" block for now.
2023-01-16 18:17:13 +01:00
Thomas Waldmann
1f9c46f2b5
create: do not store user/group for stdin data by default, see #7249
...
if you want user/group stored, give --stdin-user=USER / --stdin-group=GROUP.
2023-01-16 18:17:12 +01:00
Thomas Waldmann
b338eb0ce8
process_pipe: allow creating item w/o user/group/uid/gid, see #7249
2023-01-16 18:17:09 +01:00
Thomas Waldmann
262812e76f
get_item_data: do not require item.uid/gid, see #7249
...
if uid is not present, use None.
if gid is not present, use None.
2023-01-16 18:17:03 +01:00
Thomas Waldmann
4f9cda1aab
get_item_uid_gid: do not require item.uid/gid, see #7249
...
if uid is not present, fall back to uid_default.
if gid is not present, fall back to gid_default.
2023-01-16 18:12:34 +01:00
TW
d49665526c
Merge pull request #7232 from ThomasWaldmann/json_b64
...
implement and use (text|binary)_to_json
2023-01-16 18:10:52 +01:00
Thomas Waldmann
54892f711d
key change-passphrase: fix --encryption value in examples
...
"repokey" (as in borg < 2.0, referring to the AES-CTR mode)
does not exist any more and was superseded by other repokey-*
modes.
2023-01-16 17:58:50 +01:00
Thomas Waldmann
491f898612
borg2 archive names and comments are always pure unicode
2023-01-16 17:45:48 +01:00
Thomas Waldmann
8765e62bcd
document how borg deals with non-unicode bytes in JSON output
2023-01-16 17:45:46 +01:00
Thomas Waldmann
e63cfcd708
json output: use text_to_json, fixes #6151
...
item: path, source, user, group
for non-unicode stuff borg 1.2 had "bpath".
now we have:
path - unicode approximation (invalid stuff replaced by ?)
path_b64 - base64(path_bytes) # only if needed
source has the same issue as path and is now covered also.
user and group are usually unicode or even pure ASCII,
but we rather are cautious and cover them also.
2023-01-16 17:45:34 +01:00
Thomas Waldmann
32d430a1b0
implement text_to_json / binary_to_json, see #6151
...
binary bytes:
- json_key = <key>_b64
- json_value == base64(value)
text (potentially with surrogate escapes):
- json_key1 = <key>
- json_value1 = value_text (s-e replaced by ?)
- json_key2 = <key>_b64
- json_value2 = base64(value_binary)
json_key2/_value2 is only present if value_text required
replacement of surrogate escapes (and thus does not represent
the original value, but just an approximation).
value_binary then gives the original bytes value (e.g. a
non-utf8 bytes sequence).
2023-01-16 17:45:27 +01:00
TW
3992c1c333
Merge pull request #7267 from ThomasWaldmann/recreate-with-target-master
...
recreate: when --target is given, do not detect "nothing to do"
2023-01-16 17:23:38 +01:00
Thomas Waldmann
aa78314ffe
recreate: when --target is given, do not detect "nothing to do"
...
use case:
borg recreate -a src --target dst can be used to make a copy
of an archive inside the same repository, see #7254 .
2023-01-14 19:05:50 +01:00
Thomas Waldmann
6a3aa23f9b
locking (win32): deal with os.rmdir PermissionErrors
...
Retry if access is denied.
2023-01-13 22:50:41 +01:00
Thomas Waldmann
7063c2abec
locking (win32): deal with os.listdir PermissionErrors
...
due to unclear circumstances, windows sometimes just says "PermissionError" when trying to list a directory.
2023-01-13 22:50:13 +01:00
Thomas Waldmann
0ce2b55031
fix host, pid, tid order
...
using "differenthost" (== not the current hostname) makes
the process_alive check always return True (to play safe,
because in can not check for processes on other hosts).
2023-01-13 22:48:19 +01:00
Thomas Waldmann
e1bb669400
use os.replace not os.rename
2023-01-13 22:48:17 +01:00
Thomas Waldmann
163e92dd04
bugfix: thread id must be parsed as hex from lock file name
2023-01-13 22:48:14 +01:00
TW
ca1f1281d5
Merge pull request #7262 from ThomasWaldmann/skip-safe-unlink-test-windows
...
support win32 for test_safe_unlink* tests
2023-01-13 22:41:54 +01:00
Thomas Waldmann
829d88e614
win32 ci: show individual tests, give skip reason if tests were skipped
2023-01-13 21:01:05 +01:00
Thomas Waldmann
38152c8e5d
safe_unlink tests: use os.link to support win32 also
...
also:
- add note about mklinkto
- skip tests based on "not are_hardlinks_supported()" if needed
2023-01-13 20:59:30 +01:00
TW
7fb37271f2
Merge pull request #7258 from RayyanAnsari/windows-ci-tests
...
Add tests to Windows CI
2023-01-13 18:43:21 +01:00
TW
0d78565382
Merge pull request #7263 from helmutg/cleanup
...
delete left over documentation for borg key change-algorithm
2023-01-13 18:09:41 +01:00
Rayyan Ansari
b19d2c1449
Add tests to Windows CI
2023-01-13 17:02:41 +00:00
Helmut Grohne
e210c6c053
delete left over documentation for borg key change-algorithm
2023-01-13 13:20:49 +01:00
TW
fb9717567e
Merge pull request #7251 from puetzk/test_size_on_disk_accurate-flush
...
Fix test_size_on_disk_accurate for large st_blksize, fixes #7250
2023-01-13 10:49:41 +01:00
TW
c8809ab09d
Merge pull request #7260 from jsoref/spelling
...
Spelling
2023-01-12 18:47:18 +01:00
Josh Soref
a205c4273b
spelling: zstandard
...
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2023-01-12 11:24:05 -05:00