1
0
Fork 0
mirror of https://github.com/borgbackup/borg.git synced 2025-03-04 10:39:50 +00:00
Commit graph

6754 commits

Author SHA1 Message Date
Thomas Waldmann
8ddfd94f09 Fix test_size_on_disk_accurate on Windows
Pass the python file object / fd instead of the file path.

On Windows, a tempfile cannot be opened again, unlike on Unix systems.
See https://docs.python.org/3/library/tempfile.html#tempfile.NamedTemporaryFile
2022-11-04 20:28:09 +01:00
TW
0989cb4040
Merge pull request #7082 from ThomasWaldmann/fix-chunker-params-comparison
Fix chunker params comparison
2022-10-11 20:29:32 +02:00
Thomas Waldmann
3200190cdb diff: more precise warning msgs for different chunker params
if we know both archives' chunker params, use "are different" not "might be".
also do not recommend to enforce it using --same-chunker-params in this case.
2022-10-11 19:44:11 +02:00
Thomas Waldmann
651bef450d recreate: normalize chunker params before comparing them, see #7079
borg < 1.2 did not have the chunker name as first element in the tuple,
but it always was buzhash, because there was no other chunker.
2022-10-10 22:41:39 +02:00
Thomas Waldmann
a6207370a9 diff: normalize chunker params before comparing them, fixes #7079
borg < 1.2 did not have the chunker name as first element in the tuple,
but it always was buzhash, because there was no other chunker.
2022-10-10 22:27:12 +02:00
TW
773f3bff77
Merge pull request #7057 from ThomasWaldmann/fix-recreate-fixed-chunker-1.2
get_chunker: fix missing sparse=False argument, fixes #7056
2022-09-27 22:36:03 +02:00
Thomas Waldmann
875c94a20d get_chunker: fix missing sparse=False argument, fixes #7056 2022-09-27 21:45:51 +02:00
Thomas Waldmann
2f6197df0c add test for recreate with "fixed" chunker 2022-09-27 21:45:51 +02:00
Emmanuel Tanimowo
f49133da04
update automating backups script (#7039)
update "automating backups" script: remove last backslash, use --glob-archives
2022-09-21 00:54:38 +02:00
TW
44b4791e98
Merge pull request #7035 from ThomasWaldmann/fix-7034-1.2
check: fix uninitialised variable if repo is completely empty, fixes #7034
2022-09-17 20:51:48 +02:00
Thomas Waldmann
4f4be2631a check: fix uninitialised variable if repo is completely empty, fixes #7034 2022-09-17 20:29:34 +02:00
TW
9fe7339a39
Merge pull request #7024 from ThomasWaldmann/compat-setuptoolsscm4-1.2
do not use version_tuple placeholder in setuptools_scm template
2022-09-17 13:26:55 +02:00
Thomas Waldmann
3404346419 do not use version_tuple placeholder in setuptools_scm template
that would require setuptools_scm>=5.0.0 but some dists do not have that yet.
also, we do not use the version_tuple from _version.py, so it is not required
anyway.
2022-09-13 21:25:35 +02:00
TW
1b3cbe2461
Merge pull request #6990 from ThomasWaldmann/more-fine-grained-extended-stat-1.2
xattrs / extended stat: improve exception handling (1.2-maint)
2022-09-05 16:06:10 +02:00
Thomas Waldmann
3bd3600875 cosmetic: add missing blank to xattr test skip reason 2022-08-24 14:19:53 +02:00
Thomas Waldmann
a758fda089 xattrs: improve error handling, fixes #6988
looks like we can not rely on listxattr only returning
valid, acceptable names for getxattr.

so getxattr can still fail with EINVAL.

also:

- do not raise an exception if getting a single
xattr fails, rather emit a warning and continue
processing the remaining xattrs (and also the whole
file). we already had that for EPERM (and similar
for ENOATTR), just do it for all errors.

- _check, when it raises OSError, gives us a nice
exception object, use it.

- more helpful error msgs, try not to lose error information
2022-08-24 12:03:51 +02:00
Thomas Waldmann
b5d43506d3 extended stat: more fine grained exception handling
see #6988: it was unclear where exactly the error came from (flags, xattrs or ACLs getting?).
2022-08-23 21:56:31 +02:00
TW
9bfe210948
Merge pull request #6980 from ThomasWaldmann/rel122
release 1.2.2
2022-08-20 21:04:12 +02:00
Thomas Waldmann
101a06234f netbsd vagrant box: py310, remove some outdated fixes
seems like that stuff got fixed in 9.3.
2022-08-20 16:52:31 +02:00
Thomas Waldmann
e87c54a0a1 update CHANGES 2022-08-20 15:38:10 +02:00
Thomas Waldmann
bbad73502b requirements.lock.txt: upgrade Cython and tox 2022-08-20 15:38:10 +02:00
Thomas Waldmann
92ca260fd8 build_usage ; build_man 2022-08-20 15:38:10 +02:00
Thomas Waldmann
b024379904 fix sphinx warnings 2022-08-20 15:38:10 +02:00
TW
4e2cc02e86
Merge pull request #6967 from ThomasWaldmann/fix-versionpy-format-1.2
_version.py: remove trailing blank, add LF at EOF
2022-08-15 15:17:56 +02:00
TW
ec389edc83
Merge pull request #6944 from ThomasWaldmann/fix-ctrl-c-remote-repo-1.2
ctrl-c must not kill important subprocesses, fixes #6912
2022-08-13 23:23:50 +02:00
Thomas Waldmann
6799405012 _version.py: remove trailing blank, add LF at EOF 2022-08-13 20:35:03 +02:00
Thomas Waldmann
7a31978c55 ctrl-c must not kill other subprocesses, fixes #6912
There are some other places with subprocesses:

- borg create --content-from-command
- borg create --paths-from-command
- (de)compression filter process of import-tar / export-tar
2022-08-06 12:48:54 +02:00
Thomas Waldmann
5d83d5f153 ctrl-c must not kill the ssh subprocess, fixes #6912 2022-08-06 12:29:10 +02:00
TW
e215525339
Merge pull request #6943 from ThomasWaldmann/update-changes-1.2
update CHANGES
2022-08-06 11:37:07 +02:00
Thomas Waldmann
c4e552a1e5 update CHANGES 2022-08-06 10:41:58 +02:00
TW
fa8d8ecd73
Merge pull request #6918 from ThomasWaldmann/compaction-debugging-1.2
repository: add debug logging for issue #6687
2022-08-06 10:27:23 +02:00
TW
52cba940ea
Merge pull request #6936 from ThomasWaldmann/mkstemp_mode-1.2
use a custom mkstemp with mode support, fixes #6933, fixes #6400
2022-08-05 13:04:24 +02:00
TW
28bc76a916
Merge pull request #6937 from ThomasWaldmann/fix-warnings-1.2
Fix warnings (1.2-maint)
2022-08-04 18:23:34 +02:00
Thomas Waldmann
69f4898460 make setuptools happy, fixes #6874
work around setuptools puking about:

          ############################
          # Package would be ignored #
          ############################
          Python recognizes 'borg.cache_sync' as an importable package,
          but it is not listed in the `packages` configuration of setuptools.

          'borg.cache_sync' has been automatically added to the distribution only
          because it may contain data files, but this behavior is likely to change
          in future versions of setuptools (and therefore is considered deprecated).

          Please make sure that 'borg.cache_sync' is included as a package by using
          the `packages` configuration field or the proper discovery methods
          (for example by using `find_namespace_packages(...)`/`find_namespace:`
          instead of `find_packages(...)`/`find:`).

          You can read more about "package discovery" and "data files" on setuptools
          documentation page.
2022-08-04 15:50:05 +02:00
Thomas Waldmann
b3b5602ac2 _chunker.c: fix warnings on macOS
macOS does not have POSIX_FADV_DONTNEED, thus some variables are not
needed.
2022-08-04 14:51:06 +02:00
Thomas Waldmann
b0eee13124 use a custom mkstemp with mode support, fixes #6933, fixes #6400
hopefully this is the final fix.

after first fixing of #6400 (by using os.umask after mkstemp), there
was a new problem that chmod was not supported on some fs.

even after fixing that, there were other issues, see the ACLs issue
documented in #6933.

the root cause of all this is tempfile.mkstemp internally using a
very secure, but hardcoded and for our use case problematic mode
of 0o600.

mkstemp_mode (mosty copy&paste from python stdlib tempfile module +
"black" formatting applied) supports giving the mode via the api,
that is the only change needed.

slightly dirty due to the _xxx imports from tempfile, but hopefully
this will be supported in some future python version.
2022-08-04 14:22:56 +02:00
Thomas Waldmann
e5b6670bc6 repository: add debug logging for issue #6687
i suspect that compact_segments wrongly drops some DEL tags.

this could make already deleted chunks re-appear, leading to:
- suddenly more repo index entries than previously (check, repo part)
- suddenly orphaned chunks appearing (check, archives part)

if this is the case, the issue is harmless, but annoying/confusing.

to fix the issue, i need the complete log line "dropping DEL for id X".
the id X it mentions is one of the chunk ids borg check complains about.
2022-07-31 19:05:54 +02:00
TW
4b54cfef45
Merge pull request #6914 from ThomasWaldmann/update-changes-1.2
update CHANGES
2022-07-30 18:32:58 +02:00
Thomas Waldmann
fe27be9f3e update CHANGES 2022-07-30 17:57:57 +02:00
TW
ade2241163
Merge pull request #6911 from horazont/docs/internal-details-1.2
docs(1.2): provide more details on object layout
2022-07-30 17:43:27 +02:00
Jonas Schäfer
bd89fb717e docs: provide more details on object layout
While writing my own out-of-band decoder, I had a hard time figuring out
how to unpack the manifest. From the description, I was only able to
read that the manifest is msgpack'd, but I had not been able to figure
out that it's also going through the same encryption+compression logic
as all other things do.

This should make it a little clearer and provide the necessary
information to understand how the compression works.
2022-07-30 17:32:36 +02:00
TW
01f87c6ca1
Merge pull request #6887 from ThomasWaldmann/prune-checkpointing-1.2
prune/delete --checkpoint-interval=1800 and ctrl-c/SIGINT support, fixes #6284
2022-07-30 16:54:50 +02:00
TW
5e291ff5e1
Merge pull request #6905 from ThomasWaldmann/fix-flags-formatting-1.2
list: fix {flags:<WIDTH>} formatting, fixes #6081
2022-07-30 15:34:19 +02:00
TW
78ae0114d4
Merge pull request #6909 from ThomasWaldmann/update-changes-1.2
update CHANGES
2022-07-30 15:30:48 +02:00
TW
32616111e0
Merge pull request #6901 from ThomasWaldmann/fix-5719-1.2
check: try harder to create the key, fixes #5719
2022-07-30 15:30:32 +02:00
Thomas Waldmann
e7bd9e8442 update CHANGES 2022-07-29 11:48:18 +02:00
Thomas Waldmann
e81f6f34cd list: fix {flags:<WIDTH>} formatting, fixes #6081
item.bsdflags is either not present or an int, thus we default to 0 (== no flags) if not present.
2022-07-29 10:09:00 +02:00
Thomas Waldmann
ea4c47ec7a check: try harder to create the key, fixes #5719
the old code did just 1 attempt to detect the repo decryption key.
if the first chunkid we got from the chunks hashtable iterator was accidentally
the id of the chunk we intentionally corrupted in test_delete_double_force,
setup of the key failed and that made the test crash.

in practice, this could of course also happen if chunks are corrupted, thus
we now do many retries with other chunks before giving up.

error handling was improved: do not return None (instead of a key), it just
leads to weird crashes elsewhere, but fail early with IntegrityError and a
reasonable error msg.

rename method to make_key to avoid confusion with borg.crypto.key.identify_key.
2022-07-29 09:08:03 +02:00
Thomas Waldmann
f8e33cfdf1 prune/delete --checkpoint-interval=1800 and ctrl-c/SIGINT support, fixes #6284
manifest, repo and cache are committed every checkpoint interval.

also, when ctrl-c is pressed, finish deleting the current archive, commit and then terminate.
2022-07-28 19:15:23 +02:00
TW
3d94c595b0
Merge pull request #6896 from ThomasWaldmann/ci-macos-1.2
CI: test on macOS 12 without fuse / fuse tests
2022-07-28 00:09:59 +02:00