diff --git a/Vagrantfile b/Vagrantfile index db733708d..1c2dcfc1a 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -213,7 +213,7 @@ def install_pythons(boxname) return <<-EOF . ~/.bash_profile echo "PYTHON_CONFIGURE_OPTS: ${PYTHON_CONFIGURE_OPTS}" - pyenv install 3.12.10 + pyenv install 3.12.11 pyenv rehash EOF end @@ -231,8 +231,8 @@ def build_pyenv_venv(boxname) . ~/.bash_profile cd /vagrant/borg # use the latest 3.12 release - pyenv global 3.12.10 - pyenv virtualenv 3.12.10 borg-env + pyenv global 3.12.11 + pyenv virtualenv 3.12.11 borg-env ln -s ~/.pyenv/versions/borg-env . EOF end @@ -281,8 +281,8 @@ def run_tests(boxname, skip_env) . ../borg-env/bin/activate if which pyenv 2> /dev/null; then # for testing, use the earliest point releases of the supported python versions: - pyenv global 3.12.10 - pyenv local 3.12.10 + pyenv global 3.12.11 + pyenv local 3.12.11 fi # otherwise: just use the system python # some OSes can only run specific test envs, e.g. because they miss FUSE support: diff --git a/docs/changes.rst b/docs/changes.rst index 561df5ae9..7f8d0cea8 100644 --- a/docs/changes.rst +++ b/docs/changes.rst @@ -144,8 +144,8 @@ Compatibility notes: Change Log 2.x ============== -Version 2.0.0b18 (not released yet) ------------------------------------ +Version 2.0.0b18 (2025-06-19) +----------------------------- Please note: @@ -156,7 +156,29 @@ above. New features: -- new "buzhash64" chunker, init bh table using a 256bit key derived from ID key +- experimental new "buzhash64" chunker (later, after testing, this shall become + the default chunker in borg2): + + - add own cryptographically secure pseudo-random number generator (CSPRNG) + based on AES256-CTR to create deterministic random, based on a 256bit seed. + - use that to deterministically create a perfectly balanced buzhash64 table. + - "buzhash64" chunker computes 64bit hash values for the chunking decision. + - performance is similar to "buzhash" (measured on Apple M3P cpu). + + That should also resolve these points of criticism about the old "buzhash" + 32bit code: + + - table_base: that the bits are not randomly distributed enough + - that an XORed seed cancels out for specific window sizes + - that XORing the table with a seed is equivalent to XORing the computed hash + value with another constant + + Please test the chunkers extensively (e.g. with borg create, borg transfer), + we can hardly change them "in production", because chunking differently also + means not deduplicating with old chunks. So, in case there are changes + needed, we need to find and fix them now while borg is in beta. + + See also some other chunker changes listed below "Other changes". - serve: add --permissions option as an alternative to BORG_REPO_PERMISSIONS env var - create: auto-exclude items based on xattrs or NODUMP, see #4972 @@ -165,15 +187,16 @@ New features: also: create: read stat attrs, xattrs, ACLs early, before file contents. +Fixes: + +- compact: fix cleaning archives directory (catch correct exception, use + logger.warning, improve error msg) + Other changes: - support Python 3.14 -- msgpack: allow 1.1.1 -- msgpack version check: ignore "rc" or other version elements +- msgpack: allow 1.1.1, version check: ignore "rc" or other version elements - add derive_key to derive new keys from existing key material -- fish: fix archive name completion -- refactor: modularize tests -- refactor: use pathlib.Path - refactor the chunkers, #8882 #8883: - transform buzhash chunker C code to Cython @@ -183,12 +206,15 @@ Other changes: files and fmaps. - FileReader uses FileFMAPReader to fill its buffer and offers clients a `.read(size)` method so they can read pieces of the data. - - both chunkers now use the FileReader/FileFMAPReader code + - all chunkers now use the FileReader/FileFMAPReader code - split code and test module into packages -- ChunkerFixed: add fixed chunker tests to selftest -- ChunkerFixed: do not assert on short header read -- Chunker: use safe_fadvise -- ChunkerParams: reject even window size for buzhash, #8868 +- "fixed" chunker: add fixed chunker tests to selftest +- "fixed" chunker: do not assert on short header read +- "buzhash*" chunker: use safe_fadvise +- "buzhash" chunker: reject even window size, #8868 +- fish: fix archive name completion +- refactor: modularize tests +- refactor: use pathlib.Path - tests / CI: - CI: add bandit, a security-oriented static analysis tool diff --git a/docs/man/borg-analyze.1 b/docs/man/borg-analyze.1 index bd2002691..b10c3a087 100644 --- a/docs/man/borg-analyze.1 +++ b/docs/man/borg-analyze.1 @@ -27,7 +27,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "BORG-ANALYZE" "1" "2025-05-22" "" "borg backup tool" +.TH "BORG-ANALYZE" "1" "2025-06-18" "" "borg backup tool" .SH NAME borg-analyze \- Analyze archives .SH SYNOPSIS diff --git a/docs/man/borg-benchmark-cpu.1 b/docs/man/borg-benchmark-cpu.1 index b551a0a24..5fd0c0406 100644 --- a/docs/man/borg-benchmark-cpu.1 +++ b/docs/man/borg-benchmark-cpu.1 @@ -27,7 +27,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "BORG-BENCHMARK-CPU" "1" "2025-05-22" "" "borg backup tool" +.TH "BORG-BENCHMARK-CPU" "1" "2025-06-18" "" "borg backup tool" .SH NAME borg-benchmark-cpu \- Benchmark CPU bound operations. .SH SYNOPSIS diff --git a/docs/man/borg-benchmark-crud.1 b/docs/man/borg-benchmark-crud.1 index 65fdf97c3..a3746ff03 100644 --- a/docs/man/borg-benchmark-crud.1 +++ b/docs/man/borg-benchmark-crud.1 @@ -27,7 +27,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "BORG-BENCHMARK-CRUD" "1" "2025-05-22" "" "borg backup tool" +.TH "BORG-BENCHMARK-CRUD" "1" "2025-06-18" "" "borg backup tool" .SH NAME borg-benchmark-crud \- Benchmark Create, Read, Update, Delete for archives. .SH SYNOPSIS diff --git a/docs/man/borg-benchmark.1 b/docs/man/borg-benchmark.1 index 5764ae5f8..22a54b2b2 100644 --- a/docs/man/borg-benchmark.1 +++ b/docs/man/borg-benchmark.1 @@ -27,7 +27,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "BORG-BENCHMARK" "1" "2025-05-22" "" "borg backup tool" +.TH "BORG-BENCHMARK" "1" "2025-06-18" "" "borg backup tool" .SH NAME borg-benchmark \- benchmark command .SH SYNOPSIS diff --git a/docs/man/borg-break-lock.1 b/docs/man/borg-break-lock.1 index b9bc12708..2c35c4183 100644 --- a/docs/man/borg-break-lock.1 +++ b/docs/man/borg-break-lock.1 @@ -27,7 +27,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "BORG-BREAK-LOCK" "1" "2025-05-22" "" "borg backup tool" +.TH "BORG-BREAK-LOCK" "1" "2025-06-18" "" "borg backup tool" .SH NAME borg-break-lock \- Break the repository lock (e.g. in case it was left by a dead borg. .SH SYNOPSIS diff --git a/docs/man/borg-check.1 b/docs/man/borg-check.1 index 9d69f606b..26ed62340 100644 --- a/docs/man/borg-check.1 +++ b/docs/man/borg-check.1 @@ -27,7 +27,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "BORG-CHECK" "1" "2025-05-22" "" "borg backup tool" +.TH "BORG-CHECK" "1" "2025-06-18" "" "borg backup tool" .SH NAME borg-check \- Check repository consistency .SH SYNOPSIS diff --git a/docs/man/borg-common.1 b/docs/man/borg-common.1 index 508491d49..ff2070ca5 100644 --- a/docs/man/borg-common.1 +++ b/docs/man/borg-common.1 @@ -27,7 +27,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "BORG-COMMON" "1" "2025-05-22" "" "borg backup tool" +.TH "BORG-COMMON" "1" "2025-06-18" "" "borg backup tool" .SH NAME borg-common \- Common options of Borg commands .SH SYNOPSIS diff --git a/docs/man/borg-compact.1 b/docs/man/borg-compact.1 index 5f2bbd777..b5928d5bc 100644 --- a/docs/man/borg-compact.1 +++ b/docs/man/borg-compact.1 @@ -27,7 +27,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "BORG-COMPACT" "1" "2025-05-22" "" "borg backup tool" +.TH "BORG-COMPACT" "1" "2025-06-18" "" "borg backup tool" .SH NAME borg-compact \- Collect garbage in repository .SH SYNOPSIS diff --git a/docs/man/borg-compression.1 b/docs/man/borg-compression.1 index 79f067a6a..354fecd78 100644 --- a/docs/man/borg-compression.1 +++ b/docs/man/borg-compression.1 @@ -27,7 +27,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "BORG-COMPRESSION" "1" "2025-05-22" "" "borg backup tool" +.TH "BORG-COMPRESSION" "1" "2025-06-18" "" "borg backup tool" .SH NAME borg-compression \- Details regarding compression .SH DESCRIPTION diff --git a/docs/man/borg-create.1 b/docs/man/borg-create.1 index f3def7538..9d060beff 100644 --- a/docs/man/borg-create.1 +++ b/docs/man/borg-create.1 @@ -27,7 +27,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "BORG-CREATE" "1" "2025-05-22" "" "borg backup tool" +.TH "BORG-CREATE" "1" "2025-06-18" "" "borg backup tool" .SH NAME borg-create \- Create new archive .SH SYNOPSIS @@ -202,9 +202,6 @@ exclude directories that are tagged by containing a filesystem object with the g .TP .B \-\-keep\-exclude\-tags if tag objects are specified with \fB\-\-exclude\-if\-present\fP, don\(aqt omit the tag objects themselves from the backup archive -.TP -.B \-\-exclude\-nodump -exclude files flagged NODUMP .UNINDENT .SS Filesystem options .INDENT 0.0 diff --git a/docs/man/borg-delete.1 b/docs/man/borg-delete.1 index 31be542d5..2c84ede59 100644 --- a/docs/man/borg-delete.1 +++ b/docs/man/borg-delete.1 @@ -27,7 +27,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "BORG-DELETE" "1" "2025-05-22" "" "borg backup tool" +.TH "BORG-DELETE" "1" "2025-06-18" "" "borg backup tool" .SH NAME borg-delete \- Delete archives .SH SYNOPSIS diff --git a/docs/man/borg-diff.1 b/docs/man/borg-diff.1 index b8d6778fa..5ea192154 100644 --- a/docs/man/borg-diff.1 +++ b/docs/man/borg-diff.1 @@ -27,7 +27,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "BORG-DIFF" "1" "2025-05-22" "" "borg backup tool" +.TH "BORG-DIFF" "1" "2025-06-18" "" "borg backup tool" .SH NAME borg-diff \- Diff contents of two archives .SH SYNOPSIS diff --git a/docs/man/borg-export-tar.1 b/docs/man/borg-export-tar.1 index 48e837cd7..d5d4d7fc1 100644 --- a/docs/man/borg-export-tar.1 +++ b/docs/man/borg-export-tar.1 @@ -28,7 +28,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "BORG-EXPORT-TAR" "1" "2025-05-22" "" "borg backup tool" +.TH "BORG-EXPORT-TAR" "1" "2025-06-18" "" "borg backup tool" .SH NAME borg-export-tar \- Export archive contents as a tarball .SH SYNOPSIS diff --git a/docs/man/borg-extract.1 b/docs/man/borg-extract.1 index 8b518222e..ce401ea08 100644 --- a/docs/man/borg-extract.1 +++ b/docs/man/borg-extract.1 @@ -27,7 +27,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "BORG-EXTRACT" "1" "2025-05-22" "" "borg backup tool" +.TH "BORG-EXTRACT" "1" "2025-06-18" "" "borg backup tool" .SH NAME borg-extract \- Extract archive contents .SH SYNOPSIS diff --git a/docs/man/borg-import-tar.1 b/docs/man/borg-import-tar.1 index 4e3f2443d..846c2b1e1 100644 --- a/docs/man/borg-import-tar.1 +++ b/docs/man/borg-import-tar.1 @@ -27,7 +27,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "BORG-IMPORT-TAR" "1" "2025-05-22" "" "borg backup tool" +.TH "BORG-IMPORT-TAR" "1" "2025-06-18" "" "borg backup tool" .SH NAME borg-import-tar \- Create a backup archive from a tarball .SH SYNOPSIS diff --git a/docs/man/borg-info.1 b/docs/man/borg-info.1 index f5d33fa8b..4632ac8c2 100644 --- a/docs/man/borg-info.1 +++ b/docs/man/borg-info.1 @@ -27,7 +27,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "BORG-INFO" "1" "2025-05-22" "" "borg backup tool" +.TH "BORG-INFO" "1" "2025-06-18" "" "borg backup tool" .SH NAME borg-info \- Show archive details such as disk space used .SH SYNOPSIS diff --git a/docs/man/borg-key-change-location.1 b/docs/man/borg-key-change-location.1 index c2682771a..17f7c7e14 100644 --- a/docs/man/borg-key-change-location.1 +++ b/docs/man/borg-key-change-location.1 @@ -27,7 +27,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "BORG-KEY-CHANGE-LOCATION" "1" "2025-05-22" "" "borg backup tool" +.TH "BORG-KEY-CHANGE-LOCATION" "1" "2025-06-18" "" "borg backup tool" .SH NAME borg-key-change-location \- Change repository key location .SH SYNOPSIS diff --git a/docs/man/borg-key-change-passphrase.1 b/docs/man/borg-key-change-passphrase.1 index 6faa0f6d7..c30918fc0 100644 --- a/docs/man/borg-key-change-passphrase.1 +++ b/docs/man/borg-key-change-passphrase.1 @@ -27,7 +27,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "BORG-KEY-CHANGE-PASSPHRASE" "1" "2025-05-22" "" "borg backup tool" +.TH "BORG-KEY-CHANGE-PASSPHRASE" "1" "2025-06-18" "" "borg backup tool" .SH NAME borg-key-change-passphrase \- Change repository key file passphrase .SH SYNOPSIS diff --git a/docs/man/borg-key-export.1 b/docs/man/borg-key-export.1 index 27d580fc7..f4da662f1 100644 --- a/docs/man/borg-key-export.1 +++ b/docs/man/borg-key-export.1 @@ -27,7 +27,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "BORG-KEY-EXPORT" "1" "2025-05-22" "" "borg backup tool" +.TH "BORG-KEY-EXPORT" "1" "2025-06-18" "" "borg backup tool" .SH NAME borg-key-export \- Export the repository key for backup .SH SYNOPSIS diff --git a/docs/man/borg-key-import.1 b/docs/man/borg-key-import.1 index e2f65014a..331b88160 100644 --- a/docs/man/borg-key-import.1 +++ b/docs/man/borg-key-import.1 @@ -27,7 +27,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "BORG-KEY-IMPORT" "1" "2025-05-22" "" "borg backup tool" +.TH "BORG-KEY-IMPORT" "1" "2025-06-18" "" "borg backup tool" .SH NAME borg-key-import \- Import the repository key from backup .SH SYNOPSIS diff --git a/docs/man/borg-key.1 b/docs/man/borg-key.1 index d710ab81a..f0988aa1b 100644 --- a/docs/man/borg-key.1 +++ b/docs/man/borg-key.1 @@ -27,7 +27,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "BORG-KEY" "1" "2025-05-22" "" "borg backup tool" +.TH "BORG-KEY" "1" "2025-06-18" "" "borg backup tool" .SH NAME borg-key \- Manage a keyfile or repokey of a repository .SH SYNOPSIS diff --git a/docs/man/borg-list.1 b/docs/man/borg-list.1 index 1b3aee37b..2ca43049b 100644 --- a/docs/man/borg-list.1 +++ b/docs/man/borg-list.1 @@ -27,7 +27,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "BORG-LIST" "1" "2025-05-22" "" "borg backup tool" +.TH "BORG-LIST" "1" "2025-06-18" "" "borg backup tool" .SH NAME borg-list \- List archive contents .SH SYNOPSIS diff --git a/docs/man/borg-match-archives.1 b/docs/man/borg-match-archives.1 index ab3253c76..1fde3c960 100644 --- a/docs/man/borg-match-archives.1 +++ b/docs/man/borg-match-archives.1 @@ -27,7 +27,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "BORG-MATCH-ARCHIVES" "1" "2025-05-22" "" "borg backup tool" +.TH "BORG-MATCH-ARCHIVES" "1" "2025-06-18" "" "borg backup tool" .SH NAME borg-match-archives \- Details regarding match-archives .SH DESCRIPTION diff --git a/docs/man/borg-mount.1 b/docs/man/borg-mount.1 index 36a06f960..999a1d340 100644 --- a/docs/man/borg-mount.1 +++ b/docs/man/borg-mount.1 @@ -27,7 +27,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "BORG-MOUNT" "1" "2025-05-22" "" "borg backup tool" +.TH "BORG-MOUNT" "1" "2025-06-18" "" "borg backup tool" .SH NAME borg-mount \- Mount archive or an entire repository as a FUSE filesystem .SH SYNOPSIS diff --git a/docs/man/borg-patterns.1 b/docs/man/borg-patterns.1 index 468fbf2cd..482db4259 100644 --- a/docs/man/borg-patterns.1 +++ b/docs/man/borg-patterns.1 @@ -27,7 +27,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "BORG-PATTERNS" "1" "2025-05-22" "" "borg backup tool" +.TH "BORG-PATTERNS" "1" "2025-06-18" "" "borg backup tool" .SH NAME borg-patterns \- Details regarding patterns .SH DESCRIPTION diff --git a/docs/man/borg-placeholders.1 b/docs/man/borg-placeholders.1 index 5592a4461..89fad1831 100644 --- a/docs/man/borg-placeholders.1 +++ b/docs/man/borg-placeholders.1 @@ -27,7 +27,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "BORG-PLACEHOLDERS" "1" "2025-05-22" "" "borg backup tool" +.TH "BORG-PLACEHOLDERS" "1" "2025-06-18" "" "borg backup tool" .SH NAME borg-placeholders \- Details regarding placeholders .SH DESCRIPTION diff --git a/docs/man/borg-prune.1 b/docs/man/borg-prune.1 index 6c7e317d5..4b2e355d4 100644 --- a/docs/man/borg-prune.1 +++ b/docs/man/borg-prune.1 @@ -27,7 +27,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "BORG-PRUNE" "1" "2025-05-22" "" "borg backup tool" +.TH "BORG-PRUNE" "1" "2025-06-18" "" "borg backup tool" .SH NAME borg-prune \- Prune repository archives according to specified rules .SH SYNOPSIS diff --git a/docs/man/borg-recreate.1 b/docs/man/borg-recreate.1 index 4897eca61..ef30e7c21 100644 --- a/docs/man/borg-recreate.1 +++ b/docs/man/borg-recreate.1 @@ -27,7 +27,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "BORG-RECREATE" "1" "2025-05-22" "" "borg backup tool" +.TH "BORG-RECREATE" "1" "2025-06-18" "" "borg backup tool" .SH NAME borg-recreate \- Re-create archives .SH SYNOPSIS diff --git a/docs/man/borg-rename.1 b/docs/man/borg-rename.1 index 19cceaafd..5730be889 100644 --- a/docs/man/borg-rename.1 +++ b/docs/man/borg-rename.1 @@ -27,7 +27,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "BORG-RENAME" "1" "2025-05-22" "" "borg backup tool" +.TH "BORG-RENAME" "1" "2025-06-18" "" "borg backup tool" .SH NAME borg-rename \- Rename an existing archive .SH SYNOPSIS diff --git a/docs/man/borg-repo-compress.1 b/docs/man/borg-repo-compress.1 index 20a518516..050a9e417 100644 --- a/docs/man/borg-repo-compress.1 +++ b/docs/man/borg-repo-compress.1 @@ -27,7 +27,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "BORG-REPO-COMPRESS" "1" "2025-05-22" "" "borg backup tool" +.TH "BORG-REPO-COMPRESS" "1" "2025-06-18" "" "borg backup tool" .SH NAME borg-repo-compress \- Repository (re-)compression .SH SYNOPSIS diff --git a/docs/man/borg-repo-create.1 b/docs/man/borg-repo-create.1 index f07c49e23..f1ba46049 100644 --- a/docs/man/borg-repo-create.1 +++ b/docs/man/borg-repo-create.1 @@ -28,7 +28,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "BORG-REPO-CREATE" "1" "2025-05-22" "" "borg backup tool" +.TH "BORG-REPO-CREATE" "1" "2025-06-18" "" "borg backup tool" .SH NAME borg-repo-create \- Create a new, empty repository .SH SYNOPSIS diff --git a/docs/man/borg-repo-delete.1 b/docs/man/borg-repo-delete.1 index 495243a09..50f125145 100644 --- a/docs/man/borg-repo-delete.1 +++ b/docs/man/borg-repo-delete.1 @@ -27,7 +27,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "BORG-REPO-DELETE" "1" "2025-05-22" "" "borg backup tool" +.TH "BORG-REPO-DELETE" "1" "2025-06-18" "" "borg backup tool" .SH NAME borg-repo-delete \- Delete a repository .SH SYNOPSIS diff --git a/docs/man/borg-repo-info.1 b/docs/man/borg-repo-info.1 index d83908e7e..66dd99184 100644 --- a/docs/man/borg-repo-info.1 +++ b/docs/man/borg-repo-info.1 @@ -27,7 +27,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "BORG-REPO-INFO" "1" "2025-05-22" "" "borg backup tool" +.TH "BORG-REPO-INFO" "1" "2025-06-18" "" "borg backup tool" .SH NAME borg-repo-info \- Show repository infos .SH SYNOPSIS diff --git a/docs/man/borg-repo-list.1 b/docs/man/borg-repo-list.1 index 840bbf04d..9afc24f8a 100644 --- a/docs/man/borg-repo-list.1 +++ b/docs/man/borg-repo-list.1 @@ -27,7 +27,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "BORG-REPO-LIST" "1" "2025-05-22" "" "borg backup tool" +.TH "BORG-REPO-LIST" "1" "2025-06-18" "" "borg backup tool" .SH NAME borg-repo-list \- List the archives contained in a repository .SH SYNOPSIS diff --git a/docs/man/borg-repo-space.1 b/docs/man/borg-repo-space.1 index 2b12269c4..34670c757 100644 --- a/docs/man/borg-repo-space.1 +++ b/docs/man/borg-repo-space.1 @@ -27,7 +27,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "BORG-REPO-SPACE" "1" "2025-05-22" "" "borg backup tool" +.TH "BORG-REPO-SPACE" "1" "2025-06-18" "" "borg backup tool" .SH NAME borg-repo-space \- Manage reserved space in repository .SH SYNOPSIS diff --git a/docs/man/borg-serve.1 b/docs/man/borg-serve.1 index 9f9cd3b2a..10ce62dc2 100644 --- a/docs/man/borg-serve.1 +++ b/docs/man/borg-serve.1 @@ -27,7 +27,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "BORG-SERVE" "1" "2025-05-22" "" "borg backup tool" +.TH "BORG-SERVE" "1" "2025-06-18" "" "borg backup tool" .SH NAME borg-serve \- Start in server mode. This command is usually not used manually. .SH SYNOPSIS @@ -52,6 +52,23 @@ option if you do not want to use the default path for the socket and pid file). Please note that \fIborg serve\fP does not support giving a specific repository via the \fI\-\-repo\fP option or \fIBORG_REPO\fP environment variable. It is always the borg client which specifies the repo to use when talking to \fIborg serve\fP\&. +.sp +The \-\-permissions option allows enforcing repository permissions: +.INDENT 0.0 +.IP \(bu 2 +\fIall\fP: All permissions are granted (default, permissions system is not used) +.IP \(bu 2 +\fIno\-delete\fP: Allow reading and writing, disallow deleting and overwriting data. +New archives can be created, existing archives can not be deleted. New chunks can +be added, existing chunks can not be deleted or overwritten. +.IP \(bu 2 +\fIwrite\-only\fP: Allow writing, disallow reading data. +New archives can be created, existing archives can not be read. +New chunks can be added, existing chunks can not be read, deleted or overwritten. +.IP \(bu 2 +\fIread\-only\fP: Allow reading, disallow writing or deleting data. +Existing archives can be read, but no archives can be created or deleted. +.UNINDENT .SH OPTIONS .sp See \fIborg\-common(1)\fP for common options of Borg commands. @@ -63,6 +80,9 @@ restrict repository access to PATH. Can be specified multiple times to allow the .TP .BI \-\-restrict\-to\-repository \ PATH restrict repository access. Only the repository located at PATH (no sub\-directories are considered) is accessible. Can be specified multiple times to allow the client access to several repositories. Unlike \fB\-\-restrict\-to\-path\fP sub\-directories are not accessible; PATH needs to point directly at a repository location. PATH may be an empty directory or the last element of PATH may not exist, in which case the client may initialize a repository there. +.TP +.B \-\-permissions +Set repository permission mode. Overrides BORG_REPO_PERMISSIONS environment variable. .UNINDENT .SH EXAMPLES .sp @@ -94,9 +114,13 @@ locations like \fB/etc/environment\fP or in the forced command itself (example b $ cat ~/.ssh/authorized_keys command=\(dqborg serve \-\-restrict\-to\-path /path/to/repo\(dq,restrict ssh\-rsa AAAAB3[...] +# Specify repository permissions for an SSH keypair. +$ cat ~/.ssh/authorized_keys +command=\(dqborg serve \-\-permissions=read\-only\(dq,restrict ssh\-rsa AAAAB3[...] + # Set a BORG_XXX environment variable on the \(dqborg serve\(dq side $ cat ~/.ssh/authorized_keys -command=\(dqexport BORG_XXX=value; borg serve [...]\(dq,restrict ssh\-rsa [...] +command=\(dqBORG_XXX=value borg serve [...]\(dq,restrict ssh\-rsa [...] .EE .UNINDENT .UNINDENT @@ -104,9 +128,10 @@ command=\(dqexport BORG_XXX=value; borg serve [...]\(dq,restrict ssh\-rsa [...] \fBNOTE:\fP .INDENT 0.0 .INDENT 3.5 -The examples above use the \fBrestrict\fP directive. This does automatically -block potential dangerous ssh features, even when they are added in a future -update. Thus, this option should be preferred. +The examples above use the \fBrestrict\fP directive and assume a POSIX +compliant shell set as the user\(aqs login shell. +This does automatically block potential dangerous ssh features, even when +they are added in a future update. Thus, this option should be preferred. .sp If you\(aqre using openssh\-server < 7.2, however, you have to specify explicitly the ssh features to restrict and cannot simply use the restrict option as it diff --git a/docs/man/borg-tag.1 b/docs/man/borg-tag.1 index fcbffc028..1859e122d 100644 --- a/docs/man/borg-tag.1 +++ b/docs/man/borg-tag.1 @@ -27,7 +27,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "BORG-TAG" "1" "2025-05-22" "" "borg backup tool" +.TH "BORG-TAG" "1" "2025-06-18" "" "borg backup tool" .SH NAME borg-tag \- Manage tags .SH SYNOPSIS diff --git a/docs/man/borg-transfer.1 b/docs/man/borg-transfer.1 index db93f2cc7..fa80802ec 100644 --- a/docs/man/borg-transfer.1 +++ b/docs/man/borg-transfer.1 @@ -27,7 +27,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "BORG-TRANSFER" "1" "2025-05-22" "" "borg backup tool" +.TH "BORG-TRANSFER" "1" "2025-06-18" "" "borg backup tool" .SH NAME borg-transfer \- archives transfer from other repository, optionally upgrade data format .SH SYNOPSIS diff --git a/docs/man/borg-umount.1 b/docs/man/borg-umount.1 index d4ab2a034..a7e22cc78 100644 --- a/docs/man/borg-umount.1 +++ b/docs/man/borg-umount.1 @@ -27,7 +27,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "BORG-UMOUNT" "1" "2025-05-22" "" "borg backup tool" +.TH "BORG-UMOUNT" "1" "2025-06-18" "" "borg backup tool" .SH NAME borg-umount \- un-mount the FUSE filesystem .SH SYNOPSIS diff --git a/docs/man/borg-undelete.1 b/docs/man/borg-undelete.1 index e51bec7b4..6faf16c1f 100644 --- a/docs/man/borg-undelete.1 +++ b/docs/man/borg-undelete.1 @@ -27,7 +27,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "BORG-UNDELETE" "1" "2025-05-22" "" "borg backup tool" +.TH "BORG-UNDELETE" "1" "2025-06-18" "" "borg backup tool" .SH NAME borg-undelete \- Undelete archives .SH SYNOPSIS diff --git a/docs/man/borg-version.1 b/docs/man/borg-version.1 index 4539d4493..9154d6315 100644 --- a/docs/man/borg-version.1 +++ b/docs/man/borg-version.1 @@ -27,7 +27,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "BORG-VERSION" "1" "2025-05-22" "" "borg backup tool" +.TH "BORG-VERSION" "1" "2025-06-18" "" "borg backup tool" .SH NAME borg-version \- Display the borg client / borg server version .SH SYNOPSIS diff --git a/docs/man/borg-with-lock.1 b/docs/man/borg-with-lock.1 index def085c78..63aadd8b1 100644 --- a/docs/man/borg-with-lock.1 +++ b/docs/man/borg-with-lock.1 @@ -27,7 +27,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "BORG-WITH-LOCK" "1" "2025-05-22" "" "borg backup tool" +.TH "BORG-WITH-LOCK" "1" "2025-06-18" "" "borg backup tool" .SH NAME borg-with-lock \- run a user specified command with the repository lock held .SH SYNOPSIS diff --git a/docs/man/borg.1 b/docs/man/borg.1 index 6ca9d9396..4d34df3c5 100644 --- a/docs/man/borg.1 +++ b/docs/man/borg.1 @@ -28,7 +28,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "BORG" "1" "2025-05-22" "" "borg backup tool" +.TH "BORG" "1" "2025-06-18" "" "borg backup tool" .SH NAME borg \- deduplicating and encrypting backup tool .SH SYNOPSIS @@ -448,6 +448,9 @@ the \fB\-\-rsh CMD\fP commandline option overrides the environment variable. When set, use the given path as borg executable on the remote (defaults to \(dqborg\(dq if unset). Using \fB\-\-remote\-path PATH\fP commandline option overrides the environment variable. .TP +.B BORG_REPO_PERMISSIONS +Set repository permissions, see also: \fIborg_serve\fP +.TP .B BORG_FILES_CACHE_SUFFIX When set to a value at least one character long, instructs borg to use a specifically named (based on the suffix) alternative files cache. This can be used to avoid loading and saving diff --git a/docs/man/borgfs.1 b/docs/man/borgfs.1 index daeda1230..46a4aab51 100644 --- a/docs/man/borgfs.1 +++ b/docs/man/borgfs.1 @@ -27,7 +27,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "BORGFS" "1" "2025-05-22" "" "borg backup tool" +.TH "BORGFS" "1" "2025-06-18" "" "borg backup tool" .SH NAME borgfs \- Mount archive or an entire repository as a FUSE filesystem .SH SYNOPSIS diff --git a/docs/usage/create.rst.inc b/docs/usage/create.rst.inc index 17d1cb59d..0a070c534 100644 --- a/docs/usage/create.rst.inc +++ b/docs/usage/create.rst.inc @@ -67,8 +67,6 @@ borg create +-------------------------------------------------------+---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | | ``--keep-exclude-tags`` | if tag objects are specified with ``--exclude-if-present``, don't omit the tag objects themselves from the backup archive | +-------------------------------------------------------+---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | | ``--exclude-nodump`` | exclude files flagged NODUMP | - +-------------------------------------------------------+---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | **Filesystem options** | +-------------------------------------------------------+---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | | ``-x``, ``--one-file-system`` | stay in the same file system and do not store mount points of other file systems - this might behave different from your expectations, see the description below. | @@ -147,7 +145,6 @@ borg create --exclude-caches exclude directories that contain a CACHEDIR.TAG file (http://www.bford.info/cachedir/spec.html) --exclude-if-present NAME exclude directories that are tagged by containing a filesystem object with the given NAME --keep-exclude-tags if tag objects are specified with ``--exclude-if-present``, don't omit the tag objects themselves from the backup archive - --exclude-nodump exclude files flagged NODUMP Filesystem options diff --git a/requirements.d/development.lock.txt b/requirements.d/development.lock.txt index fe384c1de..6e6a681f3 100644 --- a/requirements.d/development.lock.txt +++ b/requirements.d/development.lock.txt @@ -1,12 +1,12 @@ setuptools==78.1.1 -setuptools-scm==8.2.0 -pip==25.0.1 +setuptools-scm==8.3.1 +pip==25.1.1 wheel==0.45.1 -virtualenv==20.30.0 -build==1.2.2 +virtualenv==20.31.2 +build==1.2.2.post1 pkgconfig==1.5.5 -tox==4.26.0 -pytest==8.4.0 +tox==4.27.0 +pytest==8.4.1 pytest-xdist==3.7.0 coverage[toml]==7.9.1 pytest-cov==6.2.1 diff --git a/scripts/borg.exe.spec b/scripts/borg.exe.spec index 1987c271e..aa39ca7e9 100644 --- a/scripts/borg.exe.spec +++ b/scripts/borg.exe.spec @@ -12,7 +12,7 @@ basepath = os.path.abspath(os.path.join(here, '..')) if is_win32: hiddenimports = ['borghash'] else: - hiddenimports = ['borg.platform.posix', 'pkg_resources.py2_warn', 'borghash'] + hiddenimports = ['borg.platform.posix', 'borghash'] block_cipher = None @@ -27,6 +27,7 @@ a = Analysis([os.path.join(basepath, 'src', 'borg', '__main__.py'), ], runtime_hooks=[], excludes=[ '_ssl', 'ssl', + 'pkg_resources', # avoid pkg_resources related warnings ], win_no_prefer_redirects=False, win_private_assemblies=False,