Skip to content

Commit 7f357b4

Browse files
update borg2 changes up to beta 10.
1 parent d052f31 commit 7f357b4

File tree

1 file changed

+134
-93
lines changed

1 file changed

+134
-93
lines changed

releases/borg-2.0.rst

Lines changed: 134 additions & 93 deletions
Original file line numberDiff line numberDiff line change
@@ -16,156 +16,197 @@ Breaking compatibility
1616

1717
**The "bad" news first:**
1818

19-
This is a breaking release, it is not directly compatible with borg 1.x repos and thus
20-
not a quick upgrade.
19+
This is a breaking release, it is not directly compatible with borg 1.x repos
20+
and thus not a quick upgrade.
2121

22-
Also, there were cli changes, thus you will need to review/edit your scripts. Wrappers
23-
and GUIs for borg also need to get adapted.
22+
Also, there were cli changes, thus you will need to review/edit your scripts.
23+
Wrappers and GUIs for borg also need to get adapted.
2424

2525
**The good news are:**
2626

27-
- if you like, you can efficiently copy your existing archives from old borg 1.x repos to
28-
new borg 2 repos using "borg transfer" (you will need space and time for this, though).
27+
- if you like, you can efficiently copy your existing archives from old borg
28+
1.x repos to new borg 2 repos using "borg transfer" (you will need space
29+
and time for this, though).
2930
- by doing a breaking release, we could:
3031

31-
- fix a lot of long-term issues that could not (easily) be fixed in a non-breaking release
32+
- fix a lot of long-term issues that could not (easily) be fixed in a non-
33+
breaking release
3234
- make the code cleaner and simpler, get rid of cruft and legacy
33-
- improve security and speed
35+
- improve security, speed and parallelism
3436
- open doors for new features and applications that were not possible yet
3537
- make the docs shorter and using borg easier
36-
- this is the first breaking release since many years and we do not plan another one
37-
anytime soon.
38+
- this is the first breaking release since many years and we do not plan
39+
another one anytime soon.
3840

3941
Major new features
4042
~~~~~~~~~~~~~~~~~~
4143

42-
- create: added retries for input files (e.g. if there is a read error or file changed while reading)
43-
- extract --continue: continue a previously interrupted extraction
44-
- additionally to ssh: repos, also implement repos via unix domain (ipc) socket
44+
- new repository and locking implementation based on borgstore project
45+
46+
- borgstore is a key/value store in python, currently supporting file: and
47+
sftp: backends. borgstore backends are easy to implement, so there might
48+
be more in future, like direct access to cloud storage repos.
49+
- borg uses these to implement file: and ssh: repos and (new) sftp: repos.
50+
- additionally to ssh: repos, we also have socket: repos now.
51+
- concurrent parallel access to a repository is now possible for most borg
52+
commands (except check and compact).
53+
- a "repository index" is not needed anymore because objects are directly
54+
found by their ID. the memory needs of this index were proportional to
55+
the object count in the repository, thus borg now needs less RAM.
56+
- stale repository locks get auto-removed if they don't get refreshed or if
57+
their owner process is known-dead.
58+
- borg compact does much less I/O because it doesn't need to compact large
59+
"segment files" to free space, each repo object is now stored separately
60+
and thus can be deleted individually also.
61+
- borg delete and prune are much faster now.
62+
- the repository works very differently now:
63+
64+
- borg 1.x: transaction-based (commit or roll back), log-like, append-only
65+
segment files, precise refcounting, repo index needed, exclusive lock
66+
needed, checkpointing and .part files needed.
67+
- borg 2: convergence, write-order, separate objects, no refcounting,
68+
garbage collection, no repo index needed, simplicity, mostly works with
69+
a shared lock, no need for checkpointing or .part files.
4570

46-
- better, more modern, faster crypto
71+
- multi-repo improvements
4772

48-
- new keys/repos only use new crypto: AEAD, AES-OCB, chacha20-poly1305, argon2.
49-
- using session keys: more secure and easier to manage, especially in multi-client or multi-repo
50-
contexts. doing this, we could get rid of problematic long term nonce/counter management.
51-
- the old crypto code will get removed in borg 2.1 (currently we still need it to read from
52-
your old borg 1.x repos). removing AES-CTR, pbkdf2, encrypt-and-mac, counter/nonce management
53-
will make borg more secure, easier to use and develop.
54-
55-
- repos are faster, safer and easier to deal with
56-
57-
- borg rcompress can do a repo-wide efficient recompression.
58-
- the new PUT2 data format uses much less crc32 and more xxh64 and offers
59-
a header-only checksum (PUT1 only offered one checksum for header+data).
60-
that way, we can safely read header infos without having to also read all the data.
61-
- vastly different speeds in misc. crc32 implementations do not matter any more.
62-
because of this, we can just use python's zlib.crc32 and do not need libdeflate's crc32.
63-
- the repo index now also stores "csize" (less random I/O for some ops)
64-
- the repo index now has an API to store and query misc. "flags" (can be used e.g. for
65-
bookkeeping of long-running whole-repo operations)
73+
- borg 1.x only could deal with 1 repository per borg invocation. borg 2.0
74+
now also knows about another repo (see --other-repo option) for some
75+
commands, like borg transfer, borg repo-create, ...
76+
- borg repo-create can create "related repositories" of an existing repo,
77+
e.g. to use them for efficient archive transfers using borg transfer.
78+
- borg transfer can copy and convert archives from a borg 1.x repo to a
79+
related borg 2 repo. to save time, it will transfer the compressed file
80+
content chunks without recompressing. but, to make your repo more secure,
81+
it will decrypt / re-encrypt all the chunks.
82+
- borg transfer can copy archives from one borg 2 repo to a related other
83+
borg 2 repo, without doing any conversion.
84+
- borg transfer usually transfers compressed chunks (avoids recompression),
85+
but there is also the option to recompress them using a specific
86+
compressor.
6687

67-
- multi-repo improvements
88+
- better, more modern, faster crypto
6889

69-
- borg 1.x only could deal with 1 repository per borg invocation. borg 2.0 now also knows
70-
about another repo (see --other-repo option) for some commands, like borg transfer,
71-
borg rcreate, ...
72-
- borg rcreate can create "related repositories" of an existing repo, e.g. to use them
73-
for efficient archive transfers using borg transfer.
74-
- borg transfer can copy and convert archives from a borg 1.x repo to a related borg 2 repo.
75-
to save time, it will transfer the compressed file content chunks without recompressing.
76-
but, to make your repo more secure, it will decrypt / re-encrypt all the chunks.
77-
- borg transfer can copy archives from one borg 2 repo to a related other borg 2 repo,
78-
without doing any conversion.
79-
- borg transfer usually transfers compressed chunks (avoids recompression), but there is
80-
also the option to recompress them using a specific compressor.
90+
- new keys/repos only use new crypto: AEAD, AES-OCB, chacha20-poly1305,
91+
argon2.
92+
- using session keys: more secure and easier to manage, especially in multi-
93+
client or multi-repo contexts. doing this, we could get rid of problematic
94+
long term nonce/counter management.
95+
- the old crypto code will get removed in borg 2.1 (currently we still need
96+
it to read from your old borg 1.x repos). removing AES-CTR, pbkdf2,
97+
encrypt-and-mac, counter/nonce management will make borg more secure,
98+
easier to use and develop.
8199

82100
- command line interface cleanups
83101

84-
- no scp style repo parameters any more (parsing ambiguity issues, no :port possible),
85-
just use the better ssh://user@host:port/path .
102+
- no scp style repo parameters any more (parsing ambiguity issues, no
103+
:port possible), just use the better ssh://user@host:port/path .
86104
- separated repo and archive, no "::" any more
87-
- split some commands that worked on archives and repos into 2 separate commands
88-
(makes the code/docs/help easier)
89-
- renamed borg init to borg rcreate for better consistency
90-
- BORG_EXIT_CODES=modern is the default now to get more specific process exit codes
91-
105+
- split some commands that worked on archives and repos into 2 separate
106+
commands (makes the code/docs/help easier)
107+
- renamed borg init to borg repo-create for better consistency
108+
- BORG_EXIT_CODES=modern is the default now to get more specific process
109+
exit codes
92110

93111
- added commands / options:
94112

95113
- you will usually need to give either -r (aka --repo) or BORG_REPO env var.
96114
- --match-archives now has support for regex or glob/shell style matching
115+
- extract --continue: continue a previously interrupted extraction
116+
- new borg repo-compress command can do a repo-wide efficient recompression.
97117
- borg key change-location: usable for repokey <-> keyfile location change
98118
- borg benchmark cpu (so you can actually see what's fastest for your CPU)
99-
- borg import/export-tar --tar-format=GNU/PAX/BORG, support ctime/atime PAX headers.
100-
GNU and PAX are standard formats, while BORG is a very low-level custom format only
101-
for borg usage.
102-
- borg create: add the "slashdot hack" to strip path prefixes in created archives
119+
- borg import/export-tar --tar-format=GNU/PAX/BORG, support ctime/atime PAX
120+
headers. GNU and PAX are standard formats, while BORG is a very low-level
121+
custom format only for borg usage.
122+
- borg create: add the "slashdot hack" to strip path prefixes in created
123+
archives
124+
- borg repo-space: optionally, you can allocate some reserved space in the
125+
repo to free in "file system full" conditions.
103126
- borg version: show local/remote borg version
104127

105128
- removed commands / options:
106129

107-
- removed -P (aka --prefix) option, use -a (aka --match-archives) instead, e.g.: -a 'PREFIX*'
130+
- removed -P (aka --prefix) option, use -a (aka --match-archives) instead,
131+
e.g.: -a 'PREFIX*'
108132
- borg upgrade (was only relevant for attic / old borg)
109133
- removed deprecated cli options
110-
- remove recreate --recompress option, the repo-wide "rcompress" is more efficient.
134+
- remove recreate --recompress option, the repo-wide "repo-compress" is
135+
more efficient.
136+
- remove borg config command (it only worked locally anyway)
137+
- repository storage quota limit (might come back if we find a more useful
138+
implementation)
139+
- repository append-only mode (might come back later, likely implemented
140+
very differently)
111141

112142
Other changes
113143
~~~~~~~~~~~~~
114144

115-
- BORG_CACHE_IMPL defaults to "adhocwithfiles" now, not using a persistent chunks cache anymore
145+
- create: added retries for input files (e.g. if there is a read error or
146+
file changed while reading)
147+
- BORG_CACHE_IMPL defaults to "adhocwithfiles" now, not using a persistent
148+
chunks cache anymore, solving all issues related to chunks cache sync.
116149
- improve acl_get / acl_set error handling, refactor acl code
117150
- crypto: use a one-step kdf for session keys
118151
- use less setup.py, use pip, build and make.py
119-
- using platformdirs python package to determine locations for configs and caches
120-
- show files / archives with local timezone offsets, store archive timestamps with tz offset
152+
- using platformdirs python package to determine locations for configs and
153+
caches
154+
- show files / archives with local timezone offsets, store archive timestamps
155+
with tz offset
121156
- make user/group/uid/gid optional in archived files
122-
- do not store .borg_part files in final archive, simplify statistics (no parts stats any more)
123-
- avoid orphan chunks on input files with OSErrors
124-
- make sure archive name/comment, stuff that get into JSON is pure valid utf-8 (no surrogate escapes)
157+
- make sure archive name/comment, stuff that get into JSON is pure valid
158+
utf-8 (no surrogate escapes)
125159
- new remote and progress logging (tunneled through RPC result channel)
126160
- internal data format / processing changes
127161

128-
- using msgpack spec 2.0 now, cleanly differentiating between text and binary bytes.
129-
the older msgpack spec attic and borg < 2.0 used did not have the binary type, so
130-
it was not pretty...
131-
also using the msgpack Timestamp data type instead of self-made bigint stuff.
132-
- archives: simpler, more symmetric handling of hardlinks ("hlid", all hardlinks have same
133-
chunks list, if any). the old way was just a big pain (e.g. for partial extracting),
134-
ugly and spread all over the code. the new way simplified the code a lot.
162+
- using msgpack spec 2.0 now, cleanly differentiating between text and
163+
binary bytes. the older msgpack spec attic and borg < 2.0 used did not
164+
have the binary type, so it was not pretty...
165+
also using the msgpack Timestamp data type instead of self-made bigint
166+
stuff.
167+
- archives: simpler, more symmetric handling of hardlinks ("hlid", all
168+
hardlinks have same chunks list, if any). the old way was just a big
169+
pain (e.g. for partial extracting), ugly and spread all over the code.
170+
the new way simplified the code a lot.
135171
- item metadata: clean up, remove, rename, fix, precompute stuff
136172
- chunks have separate encrypted metadata (size, csize, ctype, clevel).
137-
this saves time for borg rcompress/recreate when recompressing to same compressor, but other level.
138-
this also makes it possible to query size or csize without reading/transmitting/decompressing
139-
the chunk.
140-
- remove legacy zlib compression header hack, so zlib works like all the other compressors.
141-
that hack was something we had to do back in the days because attic backup did not have
142-
a compression header at all (because it only supported zlib).
143-
- got rid of "csize" (compressed size of a chunk) in chunks index and archives.
144-
this often was just "in the way" and blocked the implementation of other (re)compression
145-
related features.
146-
- massively increase the archive metadata stream size limitation (so it is practically
147-
not relevant any more)
173+
this saves time for borg repo-compress/recreate when recompressing to same
174+
compressor, but other level. this also makes it possible to query size or
175+
csize without reading/transmitting/decompressing the chunk.
176+
- remove legacy zlib compression header hack, so zlib works like all the
177+
other compressors. that hack was something we had to do back in the days
178+
because attic backup did not have a compression header at all (because it
179+
only supported zlib).
180+
- got rid of "csize" (compressed size of a chunk) in chunks index and
181+
archives. this often was just "in the way" and blocked the implementation
182+
of other (re)compression related features.
183+
- massively increase the archive metadata stream size limitation (so it is
184+
practically not relevant any more)
148185

149186
- source code changes
150187

151-
- borg 1.x borg.archiver (and also the related tests in borg.testsuite.archiver) monster
152-
modules got split into packages of modules, now usually 1 module per borg cli command.
153-
- using "black" (automated pep8 source code formatting), this reformatted ALL the code
188+
- borg 1.x borg.archiver (and also the related tests) monster modules got
189+
split into packages of modules, now usually 1 module per borg cli command.
190+
- using "black" (automated pep8 source code formatting), this reformatted
191+
ALL the code
154192
- added infrastructure so we can use "mypy" for type checking
155193

156194
- python, packaging and library changes
157195

158196
- minimum requirement: Python 3.9
159-
- we unbundled all 3rd party code and require the respective libraries to be
160-
available and installed. this makes packaging easier for dist package maintainers.
161-
- discovery is done via pkg-config or (if that does not work) BORG_*_PREFIX env vars.
197+
- we unbundled all 3rd party code and require the respective libraries to
198+
be available and installed. this makes packaging easier for dist package
199+
maintainers.
200+
- discovery is done via pkg-config or (if that does not work) BORG_*_PREFIX
201+
env vars.
162202
- our setup*.py is now much simpler, a lot moved to pyproject.toml now.
163-
- we had to stop supporting LibreSSL (e.g. on OpenBSD) due to their different API.
164-
borg on OpenBSD now also uses OpenSSL.
203+
- we had to stop supporting LibreSSL (e.g. on OpenBSD) due to their
204+
different API. borg on OpenBSD now also uses OpenSSL.
165205

166206
- getting rid of legacy stuff
167207

168208
- removed some code only needed to deal with very old attic or borg repos.
169-
users are expected to first upgrade to borg 1.2 before jumping to borg 2.0,
170-
thus we do not have to deal with any ancient stuff any more.
171-
- removed archive and manifest TAMs, using simpler approach with typed repo objects.
209+
users are expected to first upgrade to borg 1.2 before jumping to borg
210+
2.0, thus we do not have to deal with any ancient stuff any more.
211+
- removed archive and manifest TAMs, using simpler approach with typed repo
212+
objects.

0 commit comments

Comments
 (0)