1
0
Fork 0
mirror of https://github.com/borgbackup/borg.git synced 2025-02-24 23:13:25 +00:00
Commit graph

6825 commits

Author SHA1 Message Date
Thalian
421a7ef52f [DOCS] #5310 - Overhaul borg help patterns
fixes #5310
2022-06-05 09:02:04 +02:00
Elmar Hoffmann
c2317c4cce
make constants for files cache mode more clear (#6724)
* make constants for files cache mode more clear

Traditionally, DEFAULT_FILES_CACHE_MODE_UI and DEFAULT_FILES_CACHE_MODE
were - as the naming scheme implies - the same setting, one being the UI
representation as given to the --files-cache command line option and the
other being the same default value in the internal representation.

It happended that the actual value used in borg create always comes from
DEFAULT_FILES_CACHE_MODE_UI (because that does have the --files-cache
option) whereas for all other commands (that do not use the files cache) it
comes from DEFAULT_FILES_CACHE_MODE.

PR #5777 then abused this fact to implement the optimisation to skip loading
of the files cache in those other commands by changing the value of
DEFAULT_FILES_CACHE_MODE to disabled.
This however also changes the meaning of that variable and thus redesignates
it to something not matching the original naming anymore.

Anyone not aware of this change and the intention behind it looking at the
code would have a hard time figuring this out and be easily mislead.

This does away with the confusion making the code more maintainable by
renaming DEFAULT_FILES_CACHE_MODE to FILES_CACHE_MODE_DISABLED, making the
new intention of that internal default clear.

* make constant for files cache mode UI default match naming scheme
2022-05-30 14:01:19 +02:00
TW
d064f63ad7
Merge pull request #6726 from elho/use-relative-imports
Use relative imports
2022-05-29 14:05:23 +02:00
Elmar Hoffmann
fd34fa2d02 use relative imports
Use relative imports where trivially possible for more consistency and to
avoid using the borg module name explicitly.
2022-05-29 09:36:52 +02:00
Elmar Hoffmann
c34df51e3e import IntegrityError used as base class with according name
This not only brings code style in line with the other helpers that do the
same thing this way, but also does away with an unnecessary absolute import
using the borg module name explicitly.
2022-05-28 16:07:20 +02:00
TW
e8046bc761
Merge pull request #6723 from KN4CK3R/forwardport-6722
Forwardport: borg debug dump-repo-objs --ghost (#6722)
2022-05-28 13:37:56 +02:00
TW
7b08222256 Merge pull request #6722 from ThomasWaldmann/debug-get-chunk-1.2
borg debug dump-repo-objs --ghost: new --segment=S --offset=O options
2022-05-28 01:42:26 +02:00
TW
1614abd4b9
Merge pull request #6719 from fantasya-pbem/task/6407_document-pattern-changes
#6407 - Document Borg 1.2 pattern behavior change
2022-05-27 15:23:15 +02:00
Thalian
45fac2dc54 #6407 - Document Borg 1.2 pattern behavior change
Fix wrong root path that was accidently changed in last commit.
2022-05-27 15:17:43 +02:00
TW
b209fcce12
Merge pull request #6717 from fantasya-pbem/task/6407_document-pattern-changes
docs: document borg 1.2 pattern behaviour change, fixes #6407
2022-05-27 15:04:43 +02:00
Thalian
b4d3859b9e #6407 - Document Borg 1.2 pattern behavior change
Make clear that absolute paths always go into the matcher as if they are relative (without leading slash). Adapt all examples accordingly.

fixes #6407
2022-05-27 14:13:12 +02:00
TW
b10d661185
Merge pull request #6706 from ThomasWaldmann/revert-no-scp-in-master
Revert "Remove scp syntax for locations (#6697)"
2022-05-18 17:58:56 +02:00
Thomas Waldmann
61299d23db Revert "Remove scp syntax for locations (#6697)"
This reverts commit 1b4b84dfd8.
2022-05-18 17:31:10 +02:00
Emil M George
1b4b84dfd8
Remove scp syntax for locations (#6697)
remove scp syntax support from cli and from Location parser, add note about converting scp-style URLs to ssh-style, fixes #6691
2022-05-15 21:55:19 +02:00
Andrea Gelmini
c79fd61b5c
Fix typos (#6688)
fix typos

Co-authored-by: Thomas Waldmann <tw@waldmann-edv.de>
2022-05-15 21:23:48 +02:00
TW
ab4bef0372
Merge pull request #6694 from ThomasWaldmann/versions-mount-1archive-error-master
mount -o versions: give clear error msg instead of crashing
2022-05-15 19:52:32 +02:00
Thomas Waldmann
2bed467e92 mount -o versions: give clear error msg instead of crashing
it does not make sense to request versions view if you only
look at 1 archive, but the code shall not crash in that case
as it did, but give a clear error msg.
2022-05-15 00:37:45 +02:00
Christopher Klooz
594d83aad5
docs: authentication primitives: improved security and performance infos (master) (#6667)
docs: authentication primitives: improved security and performance infos
2022-05-14 22:57:22 +02:00
ReethuVinta
ac4666d7f4
documented workaround for getting help for sub-sub-commands (#6346)
docs: how to get help for sub-sub-commands
2022-05-13 18:29:43 +02:00
ReethuVinta
c85bcfd3ad
documented secret key usage against fingerprinting (#6345)
docs: secret key usage against fingerprinting

Co-authored-by: Thomas Waldmann <tw@waldmann-edv.de>
2022-05-10 21:18:40 +02:00
TW
0e3ff0ab70
Merge pull request #6682 from ThomasWaldmann/fix-archive-progress-json-master
show_progress: add finished=true/false to archive_progress json
2022-05-08 19:45:39 +02:00
TW
09a84fbd24
Merge pull request #6685 from ThomasWaldmann/fix-create-filter-master
fix create_filter_process exception handler, fixes #6681
2022-05-08 19:15:35 +02:00
Thomas Waldmann
18eb696a17 fix create_filter_process exception handler, fixes #6681
if cmd was falsy (e.g. None), there is no proc.
then, if "yield stream" raises an exception, the exception handler crashed at "proc.kill()".
2022-05-08 18:46:13 +02:00
Thomas Waldmann
1c0937958d show_progress: add finished=true/false to archive_progress json, fixes #6570
also:
- remove empty values from final json
- add test
2022-05-08 18:32:07 +02:00
TW
a3e99a2b51
Merge pull request #6659 from ThomasWaldmann/docs-fc-suffix-master
docs: mention BORG_FILES_CACHE_SUFFIX as alternative to BORG_FILES_CACHE_TTL
2022-05-07 14:39:57 +02:00
TW
4acfcf23e9
Merge pull request #6670 from ThomasWaldmann/no-pytest-check-master
check that borg does not require pytest for normal usage, fixes #6563
2022-05-07 10:41:34 +02:00
Thomas Waldmann
2c25123284 check that borg does not require pytest for normal usage, fixes #6563
also: move the note about this to the very top of the affected modules.
2022-05-07 02:24:18 +02:00
TW
dc89798496
Merge pull request #6665 from ThomasWaldmann/fix-key-idhash-compat
fix key id hash compat check
2022-05-04 00:00:21 +02:00
Thomas Waldmann
af776ce7a6 refactor: borg.key.uses_same_id_hash(key_old, key_new) 2022-05-03 21:32:35 +02:00
Thomas Waldmann
3239836dce fix key id hash compat check: also support new->new
the check only considered old key -> new key changes, but
new key to new key is of course also fine.

e.g. repokey-aes-ocb -> repokey-aes-ocb (both use hmac-sha256
as id hash)
2022-05-03 21:25:44 +02:00
TW
b0f7dd0904
Merge pull request #6664 from ThomasWaldmann/api-give-compressed-master
api: enable giving already compressed data
2022-05-03 11:43:47 +02:00
Thomas Waldmann
0e53dc040a api: enable giving already compressed data
the api already offered getting compressed data,
but not giving compressed data.

thus: cache.add_chunk and key.encrypt improved.
2022-05-03 04:15:01 +02:00
TW
19ad926c70
Merge pull request #6662 from ThomasWaldmann/decrypt-fixes
fix key.decrypt calls
2022-05-02 21:25:26 +02:00
Thomas Waldmann
cc0e33da65 fix key.decrypt calls
the id must now always be given correctly because
the AEAD crypto modes authenticate the chunk id.

the special case when id == MANIFEST_ID is now handled
inside assert_id, so we never need to give a None id.
2022-05-02 20:56:50 +02:00
TW
3ba9bab66c
Merge pull request #6660 from ThomasWaldmann/reuse-key
init --other-location=OTHER_REPO: reuse key material from OTHER_REPO
2022-05-02 20:52:13 +02:00
Thomas Waldmann
4b070040d6 init --other-location=OTHER_REPO: reuse key material from OTHER_REPO, fixes #6554
it potentially will ask for the passphrase for the key of OTHERREPO.
for the newly created repo, it will use the same passphrase.

it will copy: enc_key, enc_hmac_key, id_key, chunker_seed.

keeping the id_key (and id algorithm) and the chunker seed (and chunker
algorithm and parameters) is desirable for deduplication.
the id algorithm is usually either HMAC-SHA256 or BLAKE2b.

keeping the enc_key / enc_hmac_key must be implemented carefully:
A) AES-CTR -> AES-CTR is INSECURE due to nonce reuse, thus not allowed.
B) AES-CTR -> AEAD with session keys is secure.
C) AEAD with session keys -> AEAD with session keys is secure.

AEAD modes with session keys: AES-OCB and CHACHA20-POLY1305.
2022-05-02 18:50:27 +02:00
Thomas Waldmann
020e2defaf implement with_other_repository and BORG_OTHER_REPO 2022-05-02 18:48:14 +02:00
Thomas Waldmann
a375335859 make some code from with_repository reusable 2022-05-02 18:45:14 +02:00
Thomas Waldmann
9f09a9e096 docs: mention BORG_FILES_CACHE_SUFFIX as alternative to BORG_FILES_CACHE_TTL, fixes #5602 2022-04-30 20:28:46 +02:00
TW
65c7829216
Merge pull request #6637 from ThomasWaldmann/docs-files-cache-master
FAQ: add a hint about --debug-topic=files_cache
2022-04-20 13:02:09 +02:00
Thomas Waldmann
c2ad118434 FAQ: add a hint about --debug-topic=files_cache 2022-04-20 13:00:02 +02:00
TW
12d27d7944
Merge pull request #6630 from ThomasWaldmann/fix-iec-master
fix --iec mode output for borg delete and prune
2022-04-19 23:39:13 +02:00
TW
f937a72a13
Merge pull request #6633 from ThomasWaldmann/fix-info-authenticated-master
info: fix authenticated mode repo to show "Encrypted: No", fixes #6462
2022-04-19 23:38:43 +02:00
Thomas Waldmann
16f6983b1d info: fix authenticated mode repo to show "Encrypted: No", fixes #6462 2022-04-19 22:12:23 +02:00
Thomas Waldmann
c86d19cc06 prune: fix --stats --iec output to use binary units, see #6606 2022-04-19 21:56:29 +02:00
Thomas Waldmann
8d1e012ecc delete: fix --stats --iec output to use binary units, see #6606 2022-04-19 21:56:19 +02:00
TW
5743ec7e09
Merge pull request #6616 from ThomasWaldmann/fix-files-cache-6353-master
fix transaction rollback: use files cache filename as found in txn.active
2022-04-19 21:16:29 +02:00
TW
0e9431b174
Merge pull request #6624 from ThomasWaldmann/fix-diff-6483-master
diff: support presence change for blkdev, chrdev and fifo items (master)
2022-04-19 17:16:13 +02:00
TW
c60a314ee0 diff: support presence change for blkdev, chrdev and fifo items (1.2-maint) (#6615)
diff: support presence change for blkdev, chrdev and fifo items

also: refactor / clean up / reuse code.
2022-04-19 16:49:21 +02:00
TW
299196ebcb
Merge pull request #6619 from ThomasWaldmann/invalid-repo-msg-master
better error msg for defect or unsupported repo configs, fixes #6566
2022-04-18 09:53:09 +02:00