Skip to content

Commit ea08e49

Browse files
Merge pull request borgbackup#8332 from ThomasWaldmann/use-borgstore
use borgstore and other big changes
2 parents ffd1280 + 3794e32 commit ea08e49

File tree

166 files changed

+6754
-8431
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

166 files changed

+6754
-8431
lines changed

.github/workflows/black.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ jobs:
1212
- uses: actions/checkout@v4
1313
- uses: psf/black@stable
1414
with:
15-
version: "~= 23.0"
15+
version: "~= 24.0"

.github/workflows/ci.yml

+1-2
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,7 @@ jobs:
107107
pip install -r requirements.d/development.txt
108108
- name: Install borgbackup
109109
run: |
110-
# pip install -e .
111-
python setup.py -v develop
110+
pip install -e .
112111
- name: run tox env
113112
env:
114113
XDISTN: "4"

.pre-commit-config.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
repos:
22
- repo: https://github.com/psf/black
3-
rev: 23.1.0
3+
rev: 24.8.0
44
hooks:
55
- id: black
66
- repo: https://github.com/astral-sh/ruff-pre-commit

README.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ Main features
6969
**Speed**
7070
* performance-critical code (chunking, compression, encryption) is
7171
implemented in C/Cython
72-
* local caching of files/chunks index data
72+
* local caching
7373
* quick detection of unmodified files
7474

7575
**Data encryption**

docs/changes.rst

+57-7
Original file line numberDiff line numberDiff line change
@@ -12,20 +12,20 @@ This section provides information about security and corruption issues.
1212
Upgrade Notes
1313
=============
1414

15-
borg 1.2.x to borg 2.0
16-
----------------------
15+
borg 1.2.x/1.4.x to borg 2.0
16+
----------------------------
1717

1818
Compatibility notes:
1919

2020
- this is a major "breaking" release that is not compatible with existing repos.
2121

2222
We tried to put all the necessary "breaking" changes into this release, so we
2323
hopefully do not need another breaking release in the near future. The changes
24-
were necessary for improved security, improved speed, unblocking future
25-
improvements, getting rid of legacy crap / design limitations, having less and
26-
simpler code to maintain.
24+
were necessary for improved security, improved speed and parallelism,
25+
unblocking future improvements, getting rid of legacy crap and design
26+
limitations, having less and simpler code to maintain.
2727

28-
You can use "borg transfer" to transfer archives from borg 1.1/1.2 repos to
28+
You can use "borg transfer" to transfer archives from borg 1.2/1.4 repos to
2929
a new borg 2.0 repo, but it will need some time and space.
3030

3131
Before using "borg transfer", you must have upgraded to borg >= 1.2.6 (or
@@ -84,6 +84,7 @@ Compatibility notes:
8484
- removed --nobsdflags (use --noflags)
8585
- removed --noatime (default now, see also --atime)
8686
- removed --save-space option (does not change behaviour)
87+
- removed --bypass-lock option
8788
- using --list together with --progress is now disallowed (except with --log-json), #7219
8889
- the --glob-archives option was renamed to --match-archives (the short option
8990
name -a is unchanged) and extended to support different pattern styles:
@@ -114,12 +115,61 @@ Compatibility notes:
114115
fail now that somehow "worked" before (but maybe didn't work as intended due to
115116
the contradicting options).
116117

117-
118118
.. _changelog:
119119

120120
Change Log 2.x
121121
==============
122122

123+
Version 2.0.0b10 (2024-09-09)
124+
-----------------------------
125+
126+
TL;DR: this is a huge change and the first very fundamental change in how borg
127+
works since ever:
128+
129+
- you will need to create new repos.
130+
- likely more exciting than previous betas, definitely not for production.
131+
132+
New features:
133+
134+
- borgstore based repository, file:, ssh: and sftp: for now, more possible.
135+
- repository stores objects separately now, not using segment files.
136+
this has more fs overhead, but needs much less I/O because no segment
137+
files compaction is required anymore. also, no repository index is
138+
needed anymore because we can directly find the objects by their ID.
139+
- locking: new borgstore based repository locking with automatic stale
140+
lock removal (if lock does not get refreshed, if lock owner process is dead).
141+
- simultaneous repository access for many borg commands except check/compact.
142+
the cache lock for adhocwithfiles is still exclusive though, so use
143+
BORG_CACHE_IMPL=adhoc if you want to try that out using only 1 machine
144+
and 1 user (that implementation doesn't use a cache lock). When using
145+
multiple client machines or users, it also works with the default cache.
146+
- delete/prune: much quicker now and can be undone.
147+
- check --repair --undelete-archives: bring archives back from the dead.
148+
- rspace: manage reserved space in repository (avoid dead-end situation if
149+
repository fs runs full).
150+
151+
Bugs/issues fixed:
152+
153+
- a lot! all linked from PR #8332.
154+
155+
Other changes:
156+
157+
- repository: remove transactions, solved differently and much simpler now
158+
(convergence and write order primarily).
159+
- repository: replaced precise reference counting with "object exists in repo?"
160+
and "garbage collection of unused objects".
161+
- cache: remove transactions, remove chunks cache.
162+
removed LocalCache, BORG_CACHE_IMPL=local, solving all related issues.
163+
as in beta 9, adhowwithfiles is the default implementation.
164+
- compact: needs the borg key now (run it clientside), -v gives nice stats.
165+
- transfer: archive transfers from borg 1.x need the --from-borg1 option
166+
- check: reimplemented / bigger changes.
167+
- code: got rid of a metric ton of not needed complexity.
168+
when borg does not need to read borg 1.x repos/archives anymore, after
169+
users have transferred their archives, even much more can be removed.
170+
- docs: updated / removed outdated stuff
171+
172+
123173
Version 2.0.0b9 (2024-07-20)
124174
----------------------------
125175

docs/changes_1.x.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -3469,7 +3469,7 @@ Other changes:
34693469
- archiver tests: add check_cache tool - lints refcounts
34703470

34713471
- fixed cache sync performance regression from 1.1.0b1 onwards, #1940
3472-
- syncing the cache without chunks.archive.d (see :ref:`disable_archive_chunks`)
3472+
- syncing the cache without chunks.archive.d
34733473
now avoids any merges and is thus faster, #1940
34743474
- borg check --verify-data: faster due to linear on-disk-order scan
34753475
- borg debug-xxx commands removed, we use "debug xxx" subcommands now, #1627

docs/deployment/automated-local.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ modify it to suit your needs (e.g. more backup sets, dumping databases etc.).
105105
#
106106
107107
# Options for borg create
108-
BORG_OPTS="--stats --one-file-system --compression lz4 --checkpoint-interval 86400"
108+
BORG_OPTS="--stats --one-file-system --compression lz4"
109109
110110
# Set BORG_PASSPHRASE or BORG_PASSCOMMAND somewhere around here, using export,
111111
# if encryption is used.

docs/deployment/hosting-repositories.rst

-2
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,6 @@ can be filled to the specified quota.
6868
If storage quotas are used, ensure that all deployed Borg releases
6969
support storage quotas.
7070

71-
Refer to :ref:`internals_storage_quota` for more details on storage quotas.
72-
7371
**Specificities: Append-only repositories**
7472

7573
Running ``borg init`` via a ``borg serve --append-only`` server will **not**

0 commit comments

Comments
 (0)