1
0
Fork 0
mirror of https://github.com/borgbackup/borg.git synced 2024-12-26 01:37:20 +00:00
Commit graph

7443 commits

Author SHA1 Message Date
Thomas Waldmann
5d8d21df4d rcompress docs / examples / markup fixes 2022-10-02 15:50:41 +02:00
Thomas Waldmann
c6785c8f15 set release date 2022-10-02 15:01:16 +02:00
TW
66249b7394
Merge pull request #7067 from ThomasWaldmann/update-changes
update CHANGES
2022-10-02 14:59:39 +02:00
Thomas Waldmann
fa74247ecb update CHANGES 2022-10-02 14:51:34 +02:00
TW
c29d4a096b
Hashindex header work, fixes #6960 (#7064)
support reading new, improved hashindex header format, fixes #6960

Bit of a pain to work with that code:
- C code
- needs to still be able to read the old hashindex file format,
- while also supporting the new file format.
- the hash computed while reading the file causes additional problems because
  it expects all places in the file get read exactly once and in sequential order.
  I solved this by separately opening the file in the python part of the code and
  checking for the magic.
  BORG_IDX means the legacy file format and legacy layout of the hashtable,
  BORG2IDX means the new file format and the new layout of the hashtable.

Done:
- added a version int32 directly after the magic and set it to 2 (like borg 2).
  the old header had no version info, but could be denoted as version 1 in case
  we ever need it (currently it decides based on the magic).
- added num_empty as indicated by a TODO in count_empty, so it does not need a
  full hashtable scan to determine the amount of empty buckets.
- to keep it simpler, I just filled the HashHeader struct with a
  `char reserved[1024 - 32];`
  1024 being the desired overall header size and 32 being the currently used size.
  this alignment might be useful in case we mmap() the hashindex file one day.
2022-10-02 14:35:21 +02:00
TW
5edc53d4d4
Merge pull request #7066 from ThomasWaldmann/fix-recreate-fixed-chunker-master
get_chunker: fix missing sparse=False argument, fixes #7056
2022-10-02 14:34:18 +02:00
Thomas Waldmann
c339be7df9 get_chunker: fix missing sparse=False argument, fixes #7056 2022-10-02 14:09:19 +02:00
Thomas Waldmann
e32d733612 add test for recreate with "fixed" chunker 2022-10-02 14:02:06 +02:00
TW
b5e88129b4
Merge pull request #7065 from ThomasWaldmann/vagrant-updates
Vagrant updates
2022-10-02 03:19:15 +02:00
Thomas Waldmann
8221afe965 use absolute import to make pyinstaller binaries work again 2022-10-02 01:33:57 +02:00
Thomas Waldmann
fa83fa1c23 vagrant: upgrade pyinstaller 4.10 -> 5.4.1 2022-10-02 01:32:13 +02:00
Thomas Waldmann
420ca41961 vagrant: add python 3.11.0rc2 2022-10-01 23:13:05 +02:00
Thomas Waldmann
6034d90996 vagrant: use python 3.9.14 for binary build 2022-10-01 23:06:38 +02:00
Thomas Waldmann
ef2188b7ca increase VMCPUS and xdistn to 16 2022-10-01 23:01:27 +02:00
TW
4e87c1b6be
Merge pull request #7063 from ThomasWaldmann/item-more-cython-rebased
item.pyx: re-doing PR #5763
2022-09-29 21:14:19 +02:00
Thomas Waldmann
215ccaebea cosmetic: spaces, typos 2022-09-29 20:40:07 +02:00
Thomas Waldmann
fd5019a7b2 cpdef variables -> cdef
warning: src/borg/item.pyx:199:10: cpdef variables will not be supported in Cython 3; currently they are no different from cdef variables

  warning: src/borg/item.pyx:200:10: cpdef variables will not be supported in Cython 3; currently they are no different from cdef variables

  warning: src/borg/item.pyx:202:10: cpdef variables will not be supported in Cython 3; currently they are no different from cdef variables
2022-09-29 20:40:07 +02:00
Thomas Waldmann
ce2dd6df24 item.pyx: use more cython and turn PropDict properties to a descriptor
this turns all python level classes into extension type classes.

additionally it turns the indirect properties into direct descriptors.

test_propdict_attributes runs about 30% faster.

base memory usage as reported by sys.getsizeof(Item()):
before: 48 bytes, after this PR: 40 bytes

Author: @RonnyPfannschmidt in PR #5763
2022-09-29 20:39:06 +02:00
Thomas Waldmann
7b3cdb1aea add benchmark for item attribute / dict access
Author: @RonnyPfannschmidt in PR #5763
2022-09-29 00:47:48 +02:00
Thomas Waldmann
57ca9f6e74 faster implementation of item.chunks_contents_equal
This is about 10x faster than before, thanks to Ronny!

Author: @RonnyPfannschmidt in PR #5763
2022-09-28 18:57:40 +02:00
TW
1274b56ad4
Merge pull request #7061 from ThomasWaldmann/update-changes
update CHANGES
2022-09-28 16:01:17 +02:00
Thomas Waldmann
9315ecb89e update CHANGES 2022-09-28 15:20:15 +02:00
TW
f2fe22522d
Merge pull request #7052 from ThomasWaldmann/fix-upgrader-user-group-none
transfer: fix user/group == None crash with borg1 archives
2022-09-28 14:35:40 +02:00
TW
b8f86abaa3
Merge pull request #7059 from ThomasWaldmann/ci-py311-fuse3
CI: test pyfuse3 with python 3.11
2022-09-28 13:14:39 +02:00
Thomas Waldmann
c3e5ff613f CI: test pyfuse3 with python 3.11 2022-09-28 02:57:20 +02:00
TW
1a89db0a70
Merge pull request #7058 from ThomasWaldmann/fix-memoryview-crash
avoid memoryview related TypeError in compressors
2022-09-28 00:52:55 +02:00
Thomas Waldmann
515833c664 avoid memoryview related TypeError in compressors
fixes:

https://github.com/borgbackup/borg/discussions/7020#discussioncomment-3741024
2022-09-27 23:41:21 +02:00
TW
58c375678a
Merge pull request #7055 from ThomasWaldmann/borg-lock-wait-env-var
BORG_LOCK_WAIT=n env var to set default for --lock-wait option, fixes #5279
2022-09-27 19:41:14 +02:00
TW
ba7b9cfd30
Merge pull request #7037 from ThomasWaldmann/rcompress
rcompress: do a repo-wide (re)compression
2022-09-27 19:13:58 +02:00
Thomas Waldmann
e57ff29f22 BORG_LOCK_WAIT=n env var to set default for --lock-wait option, fixes #5279 2022-09-27 17:09:19 +02:00
Thomas Waldmann
9455c1e278 rcompress: do a repo-wide (re)compression
reads all chunks in on-disk order and recompresses them if they are not already using
the desired compression type and level (and obfuscation level).

supports SIGINT/ctrl-c and --checkpoint-interval (default: 1800s).

this is a borg command that compacts when committing (without this, it would have
a huge space usage). it commits/compacts every checkpoint interval or when
pressing ctrl-c / receiving SIGINT.
2022-09-27 16:50:19 +02:00
Thomas Waldmann
803b2a8d38 remember obfuscation level 2022-09-27 11:39:32 +02:00
TW
78b1301b98
Merge pull request #7028 from ThomasWaldmann/match-archives
implement pattern support for --match-archives, fixes #6504
2022-09-27 11:38:27 +02:00
Thomas Waldmann
b71ab084ba transfer: fix user/group == None crash with borg1 archives 2022-09-26 23:00:29 +02:00
TW
098d80f843
Merge pull request #7043 from ThomasWaldmann/misc-fixes
misc fixes
2022-09-26 17:32:50 +02:00
TW
600606897e
Merge pull request #7044 from ThomasWaldmann/repoobj-fixes
repoobj: mutate meta + misc minor fixes / updates
2022-09-21 11:55:41 +02:00
Thomas Waldmann
55b137bdae repoobj: consistency / cleanups 2022-09-21 11:19:40 +02:00
Thomas Waldmann
acc5d9870a repoobj.format: mutate meta
we should modify the meta dict given by the caller, so the caller can know
about e.g. the compression/obfuscation that was done (this is useful for rcompress).
2022-09-21 11:19:40 +02:00
Thomas Waldmann
a07c93d7f4 add assertion to key_factory, fail early with zero-len manifest data 2022-09-21 09:06:59 +02:00
Thomas Waldmann
8c9fed105d hashindex: make NSIndex1 api compatible
some new stuff is not supported for NSIndex1,
but we can avoid crashing due to function signature mismatches or
missing methods and rather have more clear exceptions.
2022-09-21 08:56:37 +02:00
TW
d671707226
Merge pull request #7042 from ThomasWaldmann/fix3-scan
repository.scan: fix start_offset
2022-09-20 21:55:34 +02:00
Thomas Waldmann
b3c7d8f5f3 repository.scan: fix start_offset
start_offset (from state) is only valid for start_segment, otherwise we must use 0.
2022-09-20 21:25:36 +02:00
TW
63f736be4f
Merge pull request #7040 from ThomasWaldmann/fix2-scan
repository.scan: use same end_segment within same scan
2022-09-19 22:47:40 +02:00
Thomas Waldmann
c4e54ca44e repository.scan: use same end_segment within same scan
achieved by putting it into the state that is now used instead of the marker.
2022-09-19 21:14:25 +02:00
TW
c0e674ce61
Merge pull request #7038 from ThomasWaldmann/fix-scan
Fix repository.scan
2022-09-19 12:28:09 +02:00
Thomas Waldmann
49a4884cfe repository.scan: do not use chunkid as marker, but (segment, offset)
when using .scan(limit, marker), we used to use the last chunkid from
the previously returned scan result to remember how far we got and
from where we need to continue.

as this approach used the repo index to look up the respective segment/offset,
it was problematic if the code using scan was re-writing the chunk to
a new segment/offset, updating the repo index (e.g. when recompressing a chunk)
and basically destroying the memory about from where we need to continue
scanning.

thus, directly returning (segment, offset) as marker is easier and solves this issue.
2022-09-19 12:03:13 +02:00
Thomas Waldmann
ce08f92090 repository.scan: only iterate over committed chunks
otherwise, if we scan+get+put (e.g. if we read/modify/write chunks to
recompress them), it would scan past the last commit and run into the
newly written chunks (and potentially never terminate).
2022-09-19 11:05:07 +02:00
TW
7e3b6752cb
Merge pull request #7036 from ThomasWaldmann/fix-7034-master
check: fix uninitialised variable if repo is completely empty, fixes #7034
2022-09-17 21:22:43 +02:00
Thomas Waldmann
78de77e67a check: fix uninitialised variable if repo is completely empty, fixes #7034 2022-09-17 20:54:13 +02:00
TW
d1cd017bd5
Merge pull request #7032 from ThomasWaldmann/compat-setuptoolsscm4-master
do not use version_tuple placeholder in setuptools_scm template
2022-09-17 13:54:16 +02:00