Skip to content

borg2: it's coming! #6602

@ThomasWaldmann

Description

@ThomasWaldmann

update: as there was no negative feedback from alpha testing, borg2 branch was merged into master, thus that big change in form of a major / breaking borg 2.0 release is coming.

read below about what's planned and what's already done.


what could be done if we decide to make a breaking release (2.0) that:

  • does not try to be compatible with old repos
  • does not try to be 100% compatible with old cli syntax (but 90%)
  • only uses new repos / keys it created itself
  • only gets old archives via borg import-tar or borg transfer

putting all the breaking stuff into 1 release is good for users (1 time effort), but will take quite some time to test and release.

After borg 2.0, we'll make a N+1 release (2.1? 3.0?) that drops all the legacy stuff from the codebase, including the converter for borg < 2.0 repos.

borg 2.0 general comments

DONE: offer a borg transfer command, #6663, that transforms old stuff only to stuff that will still be supported by borg N+1.

N+1 general comments

much of the stuff described here has own tickets, see "breaking" label / add issue links here.

2.0 crypto

  • DONE repo-create: do not create old keys (pbkdf2, legacy AES class, encrypt-and-mac)
  • DONE repo-create: do not create AES-CTR based repos, only new AEAD ciphers with session keys
  • DONE: remove all docs talking about potential nonce reuse, counter management and related
  • DONE: remove key algorithm change (pbkdf2<->argon2), just use argon2 for new repos/key
  • DONE: nonce management code for aes-ctr, not needed any more with session keys, remove nonces module remove nonce management, related repo methods #7556
  • keep old crypto code, we need it to read / decrypt old repos

N+1 crypto

  • remove pbkdf2 + pbkdfs/sha256 keys + docs - we have argon2 now
  • remove low_level.AES class which is only used for pbkdf2 key encryption
  • remove aes-ctr mode
  • remove support for super-legacy passphrase-key type (not supported since long)
  • we used hmac-sha256 and blake2b as id-hashes in the past, thus we need to keep them because we need an efficient borg transfer (not needing to re-hash)

2.0 repo

  • DONE: implement new repository based on borgstore, use borgstore and other big changes #8332
  • DONE: implement sftp: borgstore backend (a remote backend that does not need borg serve on the remote).
  • DONE keep support for reading borg 1.x repos
  • DONE read-compatibility with old local repos for borg transfer, and/or
  • DONE read-compatibility with old RPC (ssh: repos) for borg transfer (in that case the old repo would be served by an old borg version)
  • DONE borg check only checks new repos, no support for old repos
  • DONE only generate latest hints format (this is done since long)
  • DONE remove detection of attic repos, remove remainders of attic legacy #6859
  • DONE remove free nonce / nonce reservation api

N+1 repo

  • remove support for reading borg 1.x repos
  • if we reduce MAX_OBJECT_SIZE from ~20MiB to 16.000.000, 24bit are enough for the entry length
    • better alignment for segment entries together with the 1 type byte.
    • in-memory indexes have 8 free bits without using more memory
    • max archive size goes down by 20%!
    • do not allow 16MiB objects, we need some room for potential header size increase in future
    • nope, we cannot do that: we need an efficient borg transfer, not needing to re-chunk content!

2.0 indexes / cache

  • DONE remove legacy_cleanup function
  • DONE no repo index needed anymore, objects are stored separately and directly access via their id
  • DONE no chunks index persisted/synchronized anymore, existing chunks are queried from the repo.

N+1 indexes / cache

  • remove legacy indexes / caches

2.0 msgpack

N+1 msgpack

2.0 archive / item

N+1 archive / item

  • Item.get_size: remove support for items with chunks, but without precomputed size

2.0 or N+1 checksums

  • DONE we could even consider removing libdeflate in 2.0. the only major user will be "borg transfer" and that will be a one-time per repo usage.
  • DONE remove libdeflate again and use zlib.crc32 from stdlib, PUT2 format only uses crc32 for header data, not much data getting crc'ed

2.0 compression

N+1 compression

  • drop support (dispatching / handler) for the zlib dirty type bytes hack (ZLIB_legacy)
  • we need to keep all other compression algorithms, because borg transfer did not recompress

2.0 upgrade

  • DONE remove borg upgrade, doing upgrades from attic / old borg (they need to first upgrade to 1.2 and then use borg transfer)

N+1 archiver

  • remove unneeded stuff from benchmark cpu

2.0 remote

2.0 cli

2.0 locking

  • DONE implement borgstore based locking for borgstore based repos.
  • DONE stale lock removal of old locks that did not get refreshed.
  • DONE stale lock removal of locks of dead processes.
  • DONE most commands now use a shared lock, except borg compact and borg check.

y2038 and requiring 64bit

  • if we set SUPPORT_32BIT_PLATFORMS = False, the y2038 issue will be solved (AFAIK), but we require a 64bit platform then.
  • not sure if we can already do that. a lot of platforms already dropped 32bit support, but for some this is still in the works (e.g. SBC like the raspberry pi).
  • otoh, development of borg 2.0 will take a while, so there's a good chance all 32bit platforms are gone when it will be released. and even if not, borg 1.2 will still exist also.
  • Good summary, but missing infos about Python: https://en.wikipedia.org/wiki/Year_2038_problem

stuff that is out of scope

as you see above, there is already a huge scope of what should be done.

to not grow the scope even further, some stuff shall not be done (now):

  • no public key cryptography (neither by gpg nor by reinventing gpg for borg)
  • no multithreading

Metadata

Metadata

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions