Commit graph

1695 commits

Author SHA1 Message Date
Andrey Bienkowski
24e8b38f1a
Doc: borg init: explain the encryption modes better (#6184)
docs:borg init: explain the encryption modes better

The documentation for borg init was not structured logically:
1. The topic is switched from the general discussion of `borg init`
   to the discussion of encryption modes without a title.
2. Obscure technical details (chunking, id generation etc) were
   above the high-level overview and other key information.
2022-02-08 21:55:51 +01:00
bobthebadguy
45df345d29
Clarify usage of patternfile roots (#6242) 2022-02-07 20:53:25 +01:00
Thomas Waldmann
f0809cfeba docs: rst markup: remove accidental indentation in patterns help 2022-02-06 00:47:33 +01:00
Thomas Waldmann
3f02d3cd3d docs: rst markup: remove accidental indentation, fixes #6248 2022-02-06 00:44:51 +01:00
Andrey Bienkowski
e21343d2a8 Fix ArchiverTestCaseBinary.test_init_refuse_to_overwrite_keyfile 2022-02-05 22:32:09 +03:00
Andrey Bienkowski
29201a0eb5 Test: borg init refuses to overwrite keyfile
https://github.com/borgbackup/borg/pull/6046 neglected to
add a regression test
2022-02-05 22:32:09 +03:00
TW
4fa9f1faa4
Merge pull request #6188 from hexagonrecursion/nonce
docs: impact of deleting path/to/repo/nonce
2022-02-05 13:31:07 +01:00
Andrey Bienkowski
4931eadd91 Refactor: extract get_security_dir() 2022-02-05 09:06:53 +03:00
Andrey Bienkowski
e663c9aa10 Strengthen the test: we can read data w/o nonces 2022-02-05 09:06:25 +03:00
Andrey Bienkowski
37dde58154 Add tests for path/to/repo/nonce deletion
I am about to add documentation for this feature. Per the "If you liked
it, you should have put a CI test on it" rule I am adding tests to
detect if the feature regresses (causing a discrepancy between the docs
and the real behavior).
2022-02-05 09:06:17 +03:00
TW
2197e94a31
Merge pull request #6241 from ThomasWaldmann/argparse-highlander-master
argument parsing: accept some options only once, fixes #6026
2022-02-04 22:33:16 +01:00
Thomas Waldmann
c70788cef9 argument parsing: accept some options only once, fixes #6026 2022-02-04 22:08:09 +01:00
Thomas Waldmann
7edba854b2 use create=True when creating new keys, fixes #6036 2022-02-04 19:33:45 +01:00
Thomas Waldmann
d299b8bc9c KeyfileKeyBase: add create=False param to save method
If we create a new repo (and a new keyfile key, create=True),
there must not already exist a keyfile at the path/filename
where we want to write the new one.

In other use cases (e.g. if we overwrite a keyfile due
to the user changing their passphrase, create=False),
of course overwriting at the same path/fname is desired.
2022-02-04 19:33:45 +01:00
Andrey Bienkowski
9f311abd79
Doc: borg key export: add examples (#6227)
docs: borg key export: add examples

see: https://github.com/borgbackup/borg/issues/6204#issuecomment-1027150308
2022-02-04 18:37:33 +01:00
Thomas Waldmann
925daf30b7 fix intermediate commits, shall be at end of segment
compact_segments produced separate 17b files for intermediate commits, although they were intended to be end-of-segment-file commits.

this is because when the intermediate commit is triggered, we are already at an offset beyond the limit.
 thus needed to add the no_new flag to indicate that we do not want a new segment file just for the commit IF it is an intermediate commit.
2022-02-01 19:45:29 +01:00
Thomas Waldmann
79964d1a2b if ensure_dir() fails, give more informative error message, fixes #5952
previously, it just said PermissionDenied with giving the filename/path.
2022-02-01 04:02:09 +01:00
Thomas Waldmann
c4116b26c8 Location: fix bad naming: rename .orig -> .processed
- .raw is the unprocessed location (as given by user / env).
- .processed is the processed location (after placeholder replacement).
2022-01-31 21:55:12 +01:00
Thomas Waldmann
ad122e554a repo::archive location placeholder expansion fixes, fixes #5826, fixes #5998
- use expanded location for log output
- support placeholder expansion for BORG_REPO env var
- use Location.raw for the unprocessed, not expanded location string
2022-01-31 21:33:41 +01:00
Thomas Waldmann
5d4dda75d3 docs: --pattern* not experimental any more, fixes #6134 2022-01-31 20:55:08 +01:00
Thomas Waldmann
d917c3a43b delete --force: do not ask when deleting a repo, fixes #5941 2022-01-30 23:43:59 +01:00
Thomas Waldmann
20c5c6afbd delete: don't commit if nothing was deleted, avoid cache sync, fixes #6060 2022-01-30 23:15:05 +01:00
TW
a65f298477
Merge pull request #6157 from hexagonrecursion/ununit
Refactor: remove assert_true (master)
2022-01-29 23:19:11 +01:00
Andrey Bienkowski
6a5d24650f Refactor: improve a test name
https://github.com/borgbackup/borg/pull/6186#issuecomment-1023504905
> could you rename the strip test a little, so that there is
> ..._remote_repo in the test name. if one does not fully read the test
> (like me), one would assume that a strip-related test also applies to
> local repos, but in this case, the condition checked only applies to
> remote repos.
2022-01-27 23:03:15 +03:00
Andrey Bienkowski
e401d674b9 Refactor: move a test to ArchiverTestCase
Fixes #6168
2022-01-27 20:18:45 +03:00
TW
3edb19ac87
Merge pull request #6165 from hexagonrecursion/excluded-parent
docs: excluded parent dir's metadata can't restore
2022-01-23 22:05:58 +01:00
Andrey Bienkowski
bc69450cb6 Docs: excluded parent dir's metadata can't restore
The PR #6062 made a mistake: it updated the generated files instead of
the source. This is the fix

Refer to discussion in #5680.
2022-01-23 23:11:21 +03:00
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
Andrey Bienkowski
37506ca8af Refactor: remove assert_true (master)
Work toward https://github.com/borgbackup/borg/issues/28
2022-01-22 23:49:34 +03: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