Commit graph

1667 commits

Author SHA1 Message Date
Thomas Waldmann
2d4669a2b4 upgrade to xxhash 0.8.1 2022-01-23 14:43:33 +01:00
TW
91e3b0cd8f
Merge pull request #6119 from ThomasWaldmann/repo-review-master
repository: quota computation fixes for delayed compaction
2022-01-23 13:34:05 +01:00
Andrey Bienkowski
aa77957f68
Add test for: info: emit repo info even if repo has 0 archives (#6155)
add test for: info: emit repo info even if repo has 0 archives

In https://github.com/borgbackup/borg/pull/6152 it has been neglected to
add a regression test for the bug that has been fixed. This is the test.
2022-01-22 21:53:17 +01:00
Philip Waritschlager
8b61fd308c
docs: add note about GFS (#6006)
docs: add note about grandfather-father-son backup retention policy / rotation scheme
2022-01-22 20:33:02 +01:00
TW
5edc773488
Merge pull request #6108 from sophie-h/sophie-h/list-command-line
list: Add command_line to format keys
2022-01-22 20:16:41 +01:00
Sophie Herold
efd719bcc3 list: Add command_line to format keys 2022-01-22 19:13:32 +01:00
Thomas Waldmann
e22a6c2032 info: emit repo info even if repo has 0 archives, fixes #6120 2022-01-22 18:24:36 +01:00
Thomas Waldmann
8a7b32e824 repository: fix quota tests 2022-01-22 02:11:16 +01:00
Thomas Waldmann
57e0724108 repository: fix compactable space computation for empty segment file 2022-01-22 01:32:04 +01:00
Thomas Waldmann
f4b9f63856 repository: fix used quota computation
storage_quota_use should reflect current disk space usage (not considering some overheads like for the index etc.).

 if a chunk is deleted, but the segment file containing the chunk is not yet compacted, the chunk's disk space is still in use!

 when compact_segments is dropping the unused chunks, it is the right time to reduce storage_quota_use.

 storage_quota_use includes the put header overhead.
2022-01-22 01:27:23 +01:00
Graham Stockton
0724d4be4e
key export: print key if path is '-' or not given, fixes #6092 (#6093)
key export: print key if path is '-' or not given, fixes #6092

"borg key export [REPOSITORY]" now displays the key.
2022-01-20 02:55:52 +01:00
Thomas Waldmann
6226002eb0 remove support for shake_* hashes, fixes #6082 2022-01-07 22:21:22 +01:00
TW
3a878bb13c
Merge pull request #6112 from ThomasWaldmann/allow-msgpack-103
allow msgpack 1.0.3, fixes #6111
2022-01-07 14:25:59 +01:00
Thomas Waldmann
8b192db076 fix new xattr tests for binary test runs
the tests do object patching, this does not work
when we call the external binary "borg.exe".

this made these tests fail IF the borg.exe was
available (like in the debian stretch vagrant VM).
2022-01-06 23:21:07 +01:00
Thomas Waldmann
b27e7ad86d allow msgpack 1.0.3, fixes #6111 2022-01-06 21:34:52 +01:00
Reiko Asakura
e38f0b26b0
Workaround for volume shadow copy in WSL1 2021-12-24 15:15:23 -05:00
TW
bf392367f1
Merge pull request #6056 from ThomasWaldmann/fix-cache-tag-race-master
atomically create the CACHE_TAG file, see #6028
2021-12-12 22:54:11 +01:00
Andrey Bienkowski
37e1ae4735 Fix exceptions thrown by setup.py build_man
While doing some doc updates I needed a way to test them - to build
the documentation and inspect the output. I ran into an issue:
running python setup.py build_man was throwing exceptions:

1. The import-tar parser had a None description causing:

    File "/home/user/borg/setup_docs.py", line 451, in write_heading
      write(char * len(header))
    TypeError: object of type 'NoneType' has no len()

2. There was no docs/usage/import-tar.rst causing an exception too
2021-12-10 10:51:26 +03:00
Andrey Bienkowski
dcb1aef5e0
Improve docs for borg list --format (#6080)
Improve docs for `borg list` --format, fixes #6061

Co-authored-by: Andrey Bienkowski <hexagon-recursion@posteo.net>
2021-12-09 20:33:39 +01:00
Thomas Waldmann
708a5853e7 deal with the SaveFile/SyncFile race, docs 2021-12-07 22:35:28 +01:00
Thomas Waldmann
d0a3b30fdf avoid create the cache tag file on every get_cache_dir call
this re-introduces a race between os.path.exists vs. SaveFile creating that file, but due to the way how SaveFile works, it still makes sure that in the end there is a good cache tag file in place.
2021-12-07 21:47:15 +01:00
Andrey Bienkowski
f2ea757fad
Remove --list-format from borg list
While reading the docs I noticed that in `borg list` the options --list-format and --format do the same thing. Using `git log -S` I have uncovered that --list-format used to be deprecated and was supposed to be removed in c87393cab7, but you overlooked it and undeprecated it instead. What should we do now? Just remove it or deprecate it again?
2021-12-07 12:45:42 +00:00
Andrey Bienkowski
17d12b520c Forward port: Test that the archive name is not mentioned
This test was originally added in #6071
2021-12-02 17:27:13 +03:00
Andrey Bienkowski
d9e923e66f Forward port #6064: avoid expanding path into LHS of formatting operation 2021-11-30 20:51:47 +03:00
Andrey Bienkowski
3e3ed78b8c Test % in file name and xattr (see #6063) 2021-11-30 20:51:38 +03:00
Thomas Waldmann
7f5cd2c4d4 fix cyclic import issues 2021-11-17 17:36:43 +01:00
TW
9dfdd9f06a
Merge pull request #6022 from pgerber/recover
Speed up search for next valid object in segment in --repair mode
2021-11-17 15:33:40 +01:00
Thomas Waldmann
9ef0413aeb atomically create the CACHE_TAG file, see #6028 2021-11-16 16:05:56 +01:00
TW
ef6a65214e
Merge pull request #6055 from ThomasWaldmann/fix-hl-preload-master
fix hardlinkable file type check, fixes #6037
2021-11-16 15:25:59 +01:00
Thomas Waldmann
5064ec3c9a fix hardlinkable file type check, fixes #6037 2021-11-16 14:36:43 +01:00
sw9719
fec3568cba
do not show archive name in error msgs referring to repository (#6023)
do not show archive name in repo error msgs, fix #6014
2021-11-11 00:27:39 +01:00
Peter Gerber
6c21404143
Validate tag ID when --repair[ing] an object
This too should make the scan faster as, assuming the data is
random, we can skip CRC checks for almost 94% of the incorrect
header location solely based on the tag.

As draw back, this will limit the number of tags that can be
added without breaking backwards compatibility to 16, with
13 currently unused.
2021-10-28 14:13:37 +00:00
Alf Mikula
663abc7c90 Handle case of calling prune_split when there are no archives 2021-10-28 05:36:43 -07:00
Peter Gerber
2bc91e5010
Speed up search for next valid object in segment in --repair mode
When an object is corrupted, the start position of the next object
will not be known as the size field belonging to the corrupted
object may be corrupted as well. In order to find the next object
within the segment, the remainder is scanned for the next valid
object, byte-by-byte. An object is considered valid if the CRC
checksum matches the content. However, doing so the scan accepted
any object size that fit within the remainder of the segment. As a
result, in particular when the corruption occurred near the start
of a segment, CRC checksums were calculated for large objects,
often hundreds of megabytes in size, despite the size being limited
to 20 MiB. This change makes it so that CRC calculation is skipped
when the object header indicates an impossible size, thereby,
greatly reducing the number of CPU cycles used for CRC calculations.
In my case, this brought down the time for repair from hours to mere
minutes.

This has also the additional benefit that there is some verification
in addition to the CRC checksum. The 4-bytes checksum is rather
short considering the amount of data that might be in an archive.

Likely fixes the hanging --repair in #5995 also.
2021-10-28 10:59:11 +00:00
Alf Mikula
5b050bd01c Add test for prune_split when no archives exist 2021-10-27 15:52:45 -07:00
Jim Paris
7a0ffed7f0 create: fix passing device nodes and symlinks to --paths-from-stdin
Paths that come from --paths-from-stdin or --paths-from-command don't
have a parent_fd or name, so we need to use the os_stat helper that
falls back on the full path if those are missing.

Fixes borgbackup/borg#6009
2021-10-14 11:46:10 -04:00
Thomas Waldmann
59b6dc5442 require python 3.8+, fixes #5975
if you do not have py38+ yet, just use borg 1.1.x.
2021-09-16 02:21:29 +02:00
Thomas Waldmann
98230f721a fix: do not require BORG_CONFIG_DIR if BORG_{SECURITY,KEYS}_DIR are set, fixes #5979
but please note that this does not mean that "keys" and "security" are or will ever be the only subdirs below the borg config dir.
2021-09-12 15:36:07 +02:00
remyabel
795d9abad2
docs: clarify user_id vs uid for fuse (#5958)
docs: clarify user_id vs uid for fuse, fixes #5723
2021-08-25 21:42:07 +02:00
remyabel
e25095364b
docs: clarify pattern usage with commands (#5959)
docs: clarify pattern usage with commands, fixes #5176
2021-08-21 16:02:11 +02:00
Guinness
82e93527b0
Use an exception catching to avoid a stack trace
When exclude files are used, this can trigger a stack trace if the file
does not exist. Instead exit nicely without the stacktrace.

Fix #5734
2021-08-13 16:55:21 +02:00
Thomas Waldmann
5a13416a80 fix pyinstaller detection for dir-mode, fixes #5897
"running under pyinstaller" detection is now as recommended by the pyinstaller docs.
2021-07-11 00:26:50 +02:00
Thomas Waldmann
023a5a9edb docs: clarify "you will need key and passphrase" borg init warning, fixes #4622
there was a similar phrasing already, but this commit gets messages in sync
with borg 1.1 again.
2021-07-10 23:19:29 +02:00
Bruno Behnken
3b0bafc82f Adding try/finally block to make sure cleanup happens 2021-07-10 12:18:12 -03:00
Thomas Waldmann
9832559f30 remove unused libc_name
this was a remainder from 1.1-maint, but is not used any more.
2021-07-03 22:49:18 +02:00
TW
77ffb083e6
Merge pull request #5882 from KN4CK3R/master
Forward implement BORG_SELFTEST env variable (#5873)
2021-07-03 16:01:55 +02:00
TW
1d1bbfc567
Merge pull request #5831 from Swanand01/allow-files-cache=size
Allow --files-cache=size
2021-07-03 15:46:19 +02:00
TW
e6811748b1 Merge pull request #5873 from ThomasWaldmann/disable-selftest-1.1
implement BORG_SELFTEST env variable, fixes #5871
2021-07-03 12:31:13 +02:00
remyabel
e8ede14877
docs: add missing leading slashes in help patterns (#5869)
docs: add missing leading slashes in help patterns, fixes #5857
2021-06-26 02:23:46 +02:00
TW
35d2587aa6
Merge pull request #5860 from braewoods/verify_data
resolve clarify borg check --verify-data (#5808)
2021-06-19 14:08:00 +02:00