Parcourir la source

Merge pull request #5385 from ThomasWaldmann/rel120a9

release 1.2.0 alpha 9
TW il y a 4 ans
Parent
commit
f18c4bfe95
46 fichiers modifiés avec 351 ajouts et 166 suppressions
  1. 7 6
      Vagrantfile
  2. 46 7
      docs/changes.rst
  3. 1 1
      docs/man/borg-benchmark-crud.1
  4. 1 1
      docs/man/borg-benchmark.1
  5. 1 1
      docs/man/borg-break-lock.1
  6. 6 3
      docs/man/borg-check.1
  7. 2 2
      docs/man/borg-common.1
  8. 1 1
      docs/man/borg-compact.1
  9. 1 1
      docs/man/borg-compression.1
  10. 1 1
      docs/man/borg-config.1
  11. 58 6
      docs/man/borg-create.1
  12. 3 3
      docs/man/borg-delete.1
  13. 2 2
      docs/man/borg-diff.1
  14. 2 2
      docs/man/borg-export-tar.1
  15. 2 2
      docs/man/borg-extract.1
  16. 3 3
      docs/man/borg-info.1
  17. 2 2
      docs/man/borg-init.1
  18. 6 1
      docs/man/borg-key-change-passphrase.1
  19. 1 1
      docs/man/borg-key-export.1
  20. 10 1
      docs/man/borg-key-import.1
  21. 1 1
      docs/man/borg-key-migrate-to-repokey.1
  22. 1 1
      docs/man/borg-key.1
  23. 21 5
      docs/man/borg-list.1
  24. 4 4
      docs/man/borg-mount.1
  25. 2 2
      docs/man/borg-patterns.1
  26. 1 1
      docs/man/borg-placeholders.1
  27. 4 4
      docs/man/borg-prune.1
  28. 12 10
      docs/man/borg-recreate.1
  29. 1 1
      docs/man/borg-rename.1
  30. 1 1
      docs/man/borg-serve.1
  31. 1 1
      docs/man/borg-umount.1
  32. 1 1
      docs/man/borg-upgrade.1
  33. 1 1
      docs/man/borg-with-lock.1
  34. 4 7
      docs/man/borg.1
  35. 4 4
      docs/man/borgfs.1
  36. 3 0
      docs/usage/check.rst.inc
  37. 1 1
      docs/usage/common-options.rst.inc
  38. 44 4
      docs/usage/create.rst.inc
  39. 1 1
      docs/usage/help.rst.inc
  40. 10 1
      docs/usage/key_import.rst.inc
  41. 8 0
      docs/usage/list.rst.inc
  42. 2 2
      docs/usage/prune.rst.inc
  43. 61 59
      docs/usage/recreate.rst.inc
  44. 2 2
      requirements.d/fuse.txt
  45. 1 2
      scripts/borg.exe.spec
  46. 3 3
      setup.py

+ 7 - 6
Vagrantfile

@@ -132,9 +132,10 @@ end
 def install_pythons(boxname)
   return <<-EOF
     . ~/.bash_profile
+    pyenv install 3.9.0rc2  # tests, version supporting openssl 1.1
     pyenv install 3.8.0  # tests, version supporting openssl 1.1
     pyenv install 3.7.0  # tests, version supporting openssl 1.1
-    pyenv install 3.6.9  # binary build, tests, version supporting openssl 1.1
+    pyenv install 3.6.10  # binary build, tests, version supporting openssl 1.1
     pyenv rehash
   EOF
 end
@@ -152,8 +153,8 @@ def build_pyenv_venv(boxname)
     . ~/.bash_profile
     cd /vagrant/borg
     # use the latest 3.6 release
-    pyenv global 3.6.9
-    pyenv virtualenv 3.6.9 borg-env
+    pyenv global 3.6.10
+    pyenv virtualenv 3.6.10 borg-env
     ln -s ~/.pyenv/versions/borg-env .
   EOF
 end
@@ -190,7 +191,7 @@ def install_pyinstaller()
     . borg-env/bin/activate
     git clone https://github.com/thomaswaldmann/pyinstaller.git
     cd pyinstaller
-    git checkout v3.5-maint
+    git checkout v4.0-maint
     python setup.py install
   EOF
 end
@@ -214,8 +215,8 @@ def run_tests(boxname)
     . ../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.6.9 3.7.0 3.8.0
-      pyenv local 3.6.9 3.7.0 3.8.0
+      pyenv global 3.6.10 3.7.0 3.8.0 3.9.0rc2
+      pyenv local 3.6.10 3.7.0 3.8.0 3.9.0rc2
     fi
     # otherwise: just use the system python
     if which fakeroot 2> /dev/null; then

+ 46 - 7
docs/changes.rst

@@ -217,7 +217,7 @@ The best check that everything is ok is to run a dry-run extraction::
 Changelog
 =========
 
-Version 1.2.0a9 (2020-xx-xx)
+Version 1.2.0a9 (2020-10-05)
 ----------------------------
 
 Please note:
@@ -233,10 +233,9 @@ See there for feedback: https://github.com/borgbackup/borg/issues/4360
 
 Compatibility notes:
 
-- dropped support / testing for Python 3.4, minimum requirement is 3.5.
-  In case your OS does not provide Python >= 3.5, consider using our binary,
+- dropped support / testing for Python 3.4 and 3.5, minimum requirement is 3.6.
+  In case your OS does not provide Python >= 3.6, consider using our binary,
   which does not need an external Python interpreter.
-  Maybe this requirement will be raised to Python 3.6 later.
 - freeing repository space only happens when "borg compact" is invoked.
 - borg create --noatime is deprecated. Not storing atime is the default behaviour
   now (use --atime if you want to store the atime).
@@ -261,24 +260,64 @@ Compatibility notes:
        having duplicate FQDN *and* MAC address or all-zero MAC address)
   - 2) if you are aware that 1) is not the case for you, you must set
        BORG_HOST_ID env var to something unique.
+- exit with 128 + signal number, #5161.
+  if you have scripts expecting rc == 2 for a signal exit, you need to update
+  them to check for >= 128.
 
 Fixes:
 
 - fix memory leak related to preloading, #5202
+- check --repair: fix potential data loss, #5325
+- persist shadow_index in between borg runs, #4830
+- fix hardlinked CACHEDIR.TAG processing, #4911
+- --read-special: .part files also should be regular files, #5217
+- allow server side enforcing of umask, --umask is for the local borg
+  process only (see docs), #4947
+- exit with 128 + signal number, #5161
 - borg config --list does not show last_segment_checked, #5159
+- locking:
+
+  - fix ExclusiveLock race condition bug, #4923
+  - fix race condition in lock migration, #4953
+  - fix locking on openindiana, #5271
 
 New features:
 
 - --content-from-command: create archive using stdout of given command, #5174
+- allow key-import + BORG_KEY_FILE to create key files
+- build directory-based binary for macOS to avoid Gatekeeper delays
 
 Other changes:
 
+- upgrade bundled zstd to 1.4.5
+- upgrade bundled xxhash to 0.8.0, #5362
+- if self test fails, also point to OS and hardware, #5334
+- misc. shell completions fixes/updates, rewrite zsh completion
+- prettier error message when archive gets too big, #5307
+- stop relying on `false` exiting with status code 1
+- rephrase some warnings, #5164
+- parseformat: unnecessary calls removed, #5169
+- testing:
+
+  - enable Python3.9 env for test suite and VMs, #5373
+  - drop python 3.5, #5344
+  - misc. vagrant fixes/updates
+  - misc. testing fixes, #5196
 - docs:
 
+  - add ssh-agent pull backup method to doc, #5288
+  - mention double --force in prune docs
+  - update Homebrew install instructions, #5185
+  - better description of how cache and rebuilds of it work
+    and how the workaround applies to that
+  - point to borg create --list item flags in recreate usage, #5165
+  - add a note to create from stdin regarding files cache, #5180
+  - add security faq explaining AES-CTR crypto issues, #5254
+  - clarify --exclude-if-present in recreate, #5193
+  - add socat pull mode, #5150, #900
+  - move content of resources doc page to community project, #2088
   - explain hash collision, #4884
   - clarify --recompress option, #5154
-- misc. testing fixes, #5196
-- parseformat: unnecessary calls removed, #5169
 
 
 Version 1.2.0a8 (2020-04-22)
@@ -328,7 +367,7 @@ Other changes:
 - require recent enough llfuse for birthtime support, #5064
 - only store compressed data if the result actually is smaller, #4516
 - check: improve error output for matching index size, see #4829
-- ignore --stats when given with --dry-run, but continue, fixes #4373
+- ignore --stats when given with --dry-run, but continue, #4373
 - replaced usage of os.statvfs with shutil.disk_usage (better cross-platform support).
 - fuse: remove unneeded version check and compat code, micro opts
 - docs:

+ 1 - 1
docs/man/borg-benchmark-crud.1

@@ -1,6 +1,6 @@
 .\" Man page generated from reStructuredText.
 .
-.TH BORG-BENCHMARK-CRUD 1 "2020-04-21" "" "borg backup tool"
+.TH BORG-BENCHMARK-CRUD 1 "2020-10-04" "" "borg backup tool"
 .SH NAME
 borg-benchmark-crud \- Benchmark Create, Read, Update, Delete for archives.
 .

+ 1 - 1
docs/man/borg-benchmark.1

@@ -1,6 +1,6 @@
 .\" Man page generated from reStructuredText.
 .
-.TH BORG-BENCHMARK 1 "2020-04-21" "" "borg backup tool"
+.TH BORG-BENCHMARK 1 "2020-10-04" "" "borg backup tool"
 .SH NAME
 borg-benchmark \- benchmark command
 .

+ 1 - 1
docs/man/borg-break-lock.1

@@ -1,6 +1,6 @@
 .\" Man page generated from reStructuredText.
 .
-.TH BORG-BREAK-LOCK 1 "2020-04-21" "" "borg backup tool"
+.TH BORG-BREAK-LOCK 1 "2020-10-04" "" "borg backup tool"
 .SH NAME
 borg-break-lock \- Break the repository lock (e.g. in case it was left by a dead borg.
 .

+ 6 - 3
docs/man/borg-check.1

@@ -1,6 +1,6 @@
 .\" Man page generated from reStructuredText.
 .
-.TH BORG-CHECK 1 "2020-04-21" "" "borg backup tool"
+.TH BORG-CHECK 1 "2020-10-04" "" "borg backup tool"
 .SH NAME
 borg-check \- Check repository consistency
 .
@@ -37,6 +37,9 @@ borg [common options] check [options] [REPOSITORY_OR_ARCHIVE]
 .sp
 The check command verifies the consistency of a repository and the corresponding archives.
 .sp
+check \-\-repair is a potentially dangerous function and might lead to data loss
+(for kinds of corruption it is not capable of dealing with). BE VERY CAREFUL!
+.sp
 First, the underlying repository data files are checked:
 .INDENT 0.0
 .IP \(bu 2
@@ -140,10 +143,10 @@ do only a partial repo check for max. SECONDS seconds (Default: unlimited)
 .SS Archive filters
 .INDENT 0.0
 .TP
-.BI \-P \ PREFIX\fP,\fB \ \-\-prefix \ PREFIX
+.BI \-P \ PREFIX\fR,\fB \ \-\-prefix \ PREFIX
 only consider archive names starting with this prefix.
 .TP
-.BI \-a \ GLOB\fP,\fB \ \-\-glob\-archives \ GLOB
+.BI \-a \ GLOB\fR,\fB \ \-\-glob\-archives \ GLOB
 only consider archive names matching the glob. sh: rules apply, see "borg help patterns". \fB\-\-prefix\fP and \fB\-\-glob\-archives\fP are mutually exclusive.
 .TP
 .BI \-\-sort\-by \ KEYS

+ 2 - 2
docs/man/borg-common.1

@@ -1,6 +1,6 @@
 .\" Man page generated from reStructuredText.
 .
-.TH BORG-COMMON 1 "2020-04-21" "" "borg backup tool"
+.TH BORG-COMMON 1 "2020-10-04" "" "borg backup tool"
 .SH NAME
 borg-common \- Common options of Borg commands
 .
@@ -73,7 +73,7 @@ show/log the borg version
 show/log the return code (rc)
 .TP
 .BI \-\-umask \ M
-set umask to M (local and remote, default: 0077)
+set umask to M (local only, default: 0077)
 .TP
 .BI \-\-remote\-path \ PATH
 use PATH as borg executable on the remote (default: "borg")

+ 1 - 1
docs/man/borg-compact.1

@@ -1,6 +1,6 @@
 .\" Man page generated from reStructuredText.
 .
-.TH BORG-COMPACT 1 "2020-04-21" "" "borg backup tool"
+.TH BORG-COMPACT 1 "2020-10-04" "" "borg backup tool"
 .SH NAME
 borg-compact \- compact segment files in the repository
 .

+ 1 - 1
docs/man/borg-compression.1

@@ -1,6 +1,6 @@
 .\" Man page generated from reStructuredText.
 .
-.TH BORG-COMPRESSION 1 "2020-04-21" "" "borg backup tool"
+.TH BORG-COMPRESSION 1 "2020-10-04" "" "borg backup tool"
 .SH NAME
 borg-compression \- Details regarding compression
 .

+ 1 - 1
docs/man/borg-config.1

@@ -1,6 +1,6 @@
 .\" Man page generated from reStructuredText.
 .
-.TH BORG-CONFIG 1 "2020-04-21" "" "borg backup tool"
+.TH BORG-CONFIG 1 "2020-10-04" "" "borg backup tool"
 .SH NAME
 borg-config \- get, set, and delete values in a repository or cache config file
 .

+ 58 - 6
docs/man/borg-create.1

@@ -1,6 +1,6 @@
 .\" Man page generated from reStructuredText.
 .
-.TH BORG-CREATE 1 "2020-04-21" "" "borg backup tool"
+.TH BORG-CREATE 1 "2020-10-04" "" "borg backup tool"
 .SH NAME
 borg-create \- Create new archive
 .
@@ -41,7 +41,9 @@ that means if relative paths are desired, the command has to be run from the cor
 directory.
 .sp
 When giving \(aq\-\(aq as path, borg will read data from standard input and create a
-file \(aqstdin\(aq in the created archive from that data.
+file \(aqstdin\(aq in the created archive from that data. In some cases it\(aqs more
+appropriate to use \-\-content\-from\-command, however. See section \fIReading from
+stdin\fP below for details.
 .sp
 The archive will consume almost no disk space for files or parts of files that
 have already been stored in other archives.
@@ -150,12 +152,15 @@ output stats as JSON. Implies \fB\-\-stats\fP\&.
 experimental: do not synchronize the cache. Implies not using the files cache.
 .TP
 .BI \-\-stdin\-name \ NAME
-use NAME in archive for stdin data (default: "stdin")
+use NAME in archive for stdin data (default: \(aqstdin\(aq)
+.TP
+.B \-\-content\-from\-command
+interpret PATH as command and store its stdout. See also section Reading from stdin below.
 .UNINDENT
 .SS Exclusion options
 .INDENT 0.0
 .TP
-.BI \-e \ PATTERN\fP,\fB \ \-\-exclude \ PATTERN
+.BI \-e \ PATTERN\fR,\fB \ \-\-exclude \ PATTERN
 exclude paths matching PATTERN
 .TP
 .BI \-\-exclude\-from \ EXCLUDEFILE
@@ -221,13 +226,13 @@ add a comment text to the archive
 .BI \-\-timestamp \ TIMESTAMP
 manually specify the archive creation date/time (UTC, yyyy\-mm\-ddThh:mm:ss format). Alternatively, give a reference file/directory.
 .TP
-.BI \-c \ SECONDS\fP,\fB \ \-\-checkpoint\-interval \ SECONDS
+.BI \-c \ SECONDS\fR,\fB \ \-\-checkpoint\-interval \ SECONDS
 write checkpoint every SECONDS seconds (Default: 1800)
 .TP
 .BI \-\-chunker\-params \ PARAMS
 specify the chunker parameters (ALGO, CHUNK_MIN_EXP, CHUNK_MAX_EXP, HASH_MASK_BITS, HASH_WINDOW_SIZE). default: buzhash,19,23,21,4095
 .TP
-.BI \-C \ COMPRESSION\fP,\fB \ \-\-compression \ COMPRESSION
+.BI \-C \ COMPRESSION\fR,\fB \ \-\-compression \ COMPRESSION
 select compression algorithm, see the output of the "borg help compression" command for details.
 .UNINDENT
 .SH EXAMPLES
@@ -378,6 +383,53 @@ Other flags used include:
 .IP \(bu 2
 \(aq?\(aq = missing status code (if you see this, please file a bug report!)
 .UNINDENT
+.SS Reading from stdin
+.sp
+There are two methods to read from stdin. Either specify \fB\-\fP as path and
+pipe directly to borg:
+.INDENT 0.0
+.INDENT 3.5
+.sp
+.nf
+.ft C
+backup\-vm \-\-id myvm \-\-stdout | borg create REPO::ARCHIVE \-
+.ft P
+.fi
+.UNINDENT
+.UNINDENT
+.sp
+Or use \fB\-\-content\-from\-command\fP to have Borg manage the execution of the
+command and piping. If you do so, the first PATH argument is interpreted
+as command to execute and any further arguments are treated as arguments
+to the command:
+.INDENT 0.0
+.INDENT 3.5
+.sp
+.nf
+.ft C
+borg create \-\-content\-from\-command REPO::ARCHIVE \-\- backup\-vm \-\-id myvm \-\-stdout
+.ft P
+.fi
+.UNINDENT
+.UNINDENT
+.sp
+\fB\-\-\fP is used to ensure \fB\-\-id\fP and \fB\-\-stdout\fP are \fBnot\fP considered
+arguments to \fBborg\fP but rather \fBbackup\-vm\fP\&.
+.sp
+The difference between the two approaches is that piping to borg creates an
+archive even if the command piping to borg exits with a failure. In this case,
+\fBone can end up with truncated output being backed up\fP\&. Using
+\fB\-\-content\-from\-command\fP, in contrast, borg is guaranteed to fail without
+creating an archive should the command fail. The command is considered failed
+when it returned a non\-zero exit code.
+.sp
+Reading from stdin yields just a stream of data without file metadata
+associated with it, and the files cache is not needed at all. So it is
+safe to disable it via \fB\-\-files\-cache disabled\fP and speed up backup
+creation a bit.
+.sp
+By default, the content read from stdin is stored in a file called \(aqstdin\(aq.
+Use \fB\-\-stdin\-name\fP to change the name.
 .SH SEE ALSO
 .sp
 \fIborg\-common(1)\fP, \fIborg\-delete(1)\fP, \fIborg\-prune(1)\fP, \fIborg\-check(1)\fP, \fIborg\-patterns(1)\fP, \fIborg\-placeholders(1)\fP, \fIborg\-compression(1)\fP

+ 3 - 3
docs/man/borg-delete.1

@@ -1,6 +1,6 @@
 .\" Man page generated from reStructuredText.
 .
-.TH BORG-DELETE 1 "2020-04-21" "" "borg backup tool"
+.TH BORG-DELETE 1 "2020-10-04" "" "borg backup tool"
 .SH NAME
 borg-delete \- Delete an existing repository or archives
 .
@@ -95,10 +95,10 @@ work slower, but using less space
 .SS Archive filters
 .INDENT 0.0
 .TP
-.BI \-P \ PREFIX\fP,\fB \ \-\-prefix \ PREFIX
+.BI \-P \ PREFIX\fR,\fB \ \-\-prefix \ PREFIX
 only consider archive names starting with this prefix.
 .TP
-.BI \-a \ GLOB\fP,\fB \ \-\-glob\-archives \ GLOB
+.BI \-a \ GLOB\fR,\fB \ \-\-glob\-archives \ GLOB
 only consider archive names matching the glob. sh: rules apply, see "borg help patterns". \fB\-\-prefix\fP and \fB\-\-glob\-archives\fP are mutually exclusive.
 .TP
 .BI \-\-sort\-by \ KEYS

+ 2 - 2
docs/man/borg-diff.1

@@ -1,6 +1,6 @@
 .\" Man page generated from reStructuredText.
 .
-.TH BORG-DIFF 1 "2020-04-21" "" "borg backup tool"
+.TH BORG-DIFF 1 "2020-10-04" "" "borg backup tool"
 .SH NAME
 borg-diff \- Diff contents of two archives
 .
@@ -81,7 +81,7 @@ Sort the output lines by file path.
 .SS Exclusion options
 .INDENT 0.0
 .TP
-.BI \-e \ PATTERN\fP,\fB \ \-\-exclude \ PATTERN
+.BI \-e \ PATTERN\fR,\fB \ \-\-exclude \ PATTERN
 exclude paths matching PATTERN
 .TP
 .BI \-\-exclude\-from \ EXCLUDEFILE

+ 2 - 2
docs/man/borg-export-tar.1

@@ -1,6 +1,6 @@
 .\" Man page generated from reStructuredText.
 .
-.TH BORG-EXPORT-TAR 1 "2020-04-21" "" "borg backup tool"
+.TH BORG-EXPORT-TAR 1 "2020-10-04" "" "borg backup tool"
 .SH NAME
 borg-export-tar \- Export archive contents as a tarball
 .
@@ -99,7 +99,7 @@ output verbose list of items (files, dirs, ...)
 .SS Exclusion options
 .INDENT 0.0
 .TP
-.BI \-e \ PATTERN\fP,\fB \ \-\-exclude \ PATTERN
+.BI \-e \ PATTERN\fR,\fB \ \-\-exclude \ PATTERN
 exclude paths matching PATTERN
 .TP
 .BI \-\-exclude\-from \ EXCLUDEFILE

+ 2 - 2
docs/man/borg-extract.1

@@ -1,6 +1,6 @@
 .\" Man page generated from reStructuredText.
 .
-.TH BORG-EXTRACT 1 "2020-04-21" "" "borg backup tool"
+.TH BORG-EXTRACT 1 "2020-10-04" "" "borg backup tool"
 .SH NAME
 borg-extract \- Extract archive contents
 .
@@ -95,7 +95,7 @@ create holes in output sparse file from all\-zero chunks
 .SS Exclusion options
 .INDENT 0.0
 .TP
-.BI \-e \ PATTERN\fP,\fB \ \-\-exclude \ PATTERN
+.BI \-e \ PATTERN\fR,\fB \ \-\-exclude \ PATTERN
 exclude paths matching PATTERN
 .TP
 .BI \-\-exclude\-from \ EXCLUDEFILE

+ 3 - 3
docs/man/borg-info.1

@@ -1,6 +1,6 @@
 .\" Man page generated from reStructuredText.
 .
-.TH BORG-INFO 1 "2020-04-21" "" "borg backup tool"
+.TH BORG-INFO 1 "2020-10-04" "" "borg backup tool"
 .SH NAME
 borg-info \- Show archive details such as disk space used
 .
@@ -68,10 +68,10 @@ format output as JSON
 .SS Archive filters
 .INDENT 0.0
 .TP
-.BI \-P \ PREFIX\fP,\fB \ \-\-prefix \ PREFIX
+.BI \-P \ PREFIX\fR,\fB \ \-\-prefix \ PREFIX
 only consider archive names starting with this prefix.
 .TP
-.BI \-a \ GLOB\fP,\fB \ \-\-glob\-archives \ GLOB
+.BI \-a \ GLOB\fR,\fB \ \-\-glob\-archives \ GLOB
 only consider archive names matching the glob. sh: rules apply, see "borg help patterns". \fB\-\-prefix\fP and \fB\-\-glob\-archives\fP are mutually exclusive.
 .TP
 .BI \-\-sort\-by \ KEYS

+ 2 - 2
docs/man/borg-init.1

@@ -1,6 +1,6 @@
 .\" Man page generated from reStructuredText.
 .
-.TH BORG-INIT 1 "2020-04-21" "" "borg backup tool"
+.TH BORG-INIT 1 "2020-10-04" "" "borg backup tool"
 .SH NAME
 borg-init \- Initialize an empty repository
 .
@@ -189,7 +189,7 @@ repository to create
 .SS optional arguments
 .INDENT 0.0
 .TP
-.BI \-e \ MODE\fP,\fB \ \-\-encryption \ MODE
+.BI \-e \ MODE\fR,\fB \ \-\-encryption \ MODE
 select encryption key mode \fB(required)\fP
 .TP
 .B \-\-append\-only

+ 6 - 1
docs/man/borg-key-change-passphrase.1

@@ -1,6 +1,6 @@
 .\" Man page generated from reStructuredText.
 .
-.TH BORG-KEY-CHANGE-PASSPHRASE 1 "2020-04-21" "" "borg backup tool"
+.TH BORG-KEY-CHANGE-PASSPHRASE 1 "2020-10-04" "" "borg backup tool"
 .SH NAME
 borg-key-change-passphrase \- Change repository key file passphrase
 .
@@ -73,6 +73,11 @@ Enter new passphrase:
 Enter same passphrase again:
 Remember your passphrase. Your data will be inaccessible without it.
 Key updated
+
+# Import a previously\-exported key into the specified
+# key file (creating or overwriting the output key)
+# (keyfile repositories only)
+$ BORG_KEY_FILE=/path/to/output\-key borg key import /path/to/repo /path/to/exported
 .ft P
 .fi
 .UNINDENT

+ 1 - 1
docs/man/borg-key-export.1

@@ -1,6 +1,6 @@
 .\" Man page generated from reStructuredText.
 .
-.TH BORG-KEY-EXPORT 1 "2020-04-21" "" "borg backup tool"
+.TH BORG-KEY-EXPORT 1 "2020-10-04" "" "borg backup tool"
 .SH NAME
 borg-key-export \- Export the repository key for backup
 .

+ 10 - 1
docs/man/borg-key-import.1

@@ -1,6 +1,6 @@
 .\" Man page generated from reStructuredText.
 .
-.TH BORG-KEY-IMPORT 1 "2020-04-21" "" "borg backup tool"
+.TH BORG-KEY-IMPORT 1 "2020-10-04" "" "borg backup tool"
 .SH NAME
 borg-key-import \- Import the repository key from backup
 .
@@ -40,6 +40,15 @@ This command restores a key previously backed up with the export command.
 If the \fB\-\-paper\fP option is given, the import will be an interactive
 process in which each line is checked for plausibility before
 proceeding to the next line. For this format PATH must not be given.
+.sp
+For repositories using keyfile encryption, the key file which \fBborg key
+import\fP writes to depends on several factors. If the \fBBORG_KEY_FILE\fP
+environment variable is set and non\-empty, \fBborg key import\fP creates
+or overwrites that file named by \fB$BORG_KEY_FILE\fP\&. Otherwise, \fBborg
+key import\fP searches in the \fB$BORG_KEYS_DIR\fP directory for a key file
+associated with the repository. If a key file is found in
+\fB$BORG_KEYS_DIR\fP, \fBborg key import\fP overwrites it; otherwise, \fBborg
+key import\fP creates a new key file in \fB$BORG_KEYS_DIR\fP\&.
 .SH OPTIONS
 .sp
 See \fIborg\-common(1)\fP for common options of Borg commands.

+ 1 - 1
docs/man/borg-key-migrate-to-repokey.1

@@ -1,6 +1,6 @@
 .\" Man page generated from reStructuredText.
 .
-.TH BORG-KEY-MIGRATE-TO-REPOKEY 1 "2020-04-21" "" "borg backup tool"
+.TH BORG-KEY-MIGRATE-TO-REPOKEY 1 "2020-10-04" "" "borg backup tool"
 .SH NAME
 borg-key-migrate-to-repokey \- Migrate passphrase -> repokey
 .

+ 1 - 1
docs/man/borg-key.1

@@ -1,6 +1,6 @@
 .\" Man page generated from reStructuredText.
 .
-.TH BORG-KEY 1 "2020-04-21" "" "borg backup tool"
+.TH BORG-KEY 1 "2020-10-04" "" "borg backup tool"
 .SH NAME
 borg-key \- Manage a keyfile or repokey of a repository
 .

+ 21 - 5
docs/man/borg-list.1

@@ -1,6 +1,6 @@
 .\" Man page generated from reStructuredText.
 .
-.TH BORG-LIST 1 "2020-04-21" "" "borg backup tool"
+.TH BORG-LIST 1 "2020-10-04" "" "borg backup tool"
 .SH NAME
 borg-list \- List archive or repository contents
 .
@@ -59,7 +59,7 @@ Show checkpoint archives in the repository contents list (default: hidden).
 .B \-\-short
 only print file/directory names, nothing else
 .TP
-.BI \-\-format \ FORMAT\fP,\fB \ \-\-list\-format \ FORMAT
+.BI \-\-format \ FORMAT\fR,\fB \ \-\-list\-format \ FORMAT
 specify format for file listing (default: "{mode} {user:6} {group:6} {size:8d} {mtime} {path}{extra}{NL}")
 .TP
 .B \-\-json
@@ -71,10 +71,10 @@ Only valid for listing archive contents. Format output as JSON Lines. The form o
 .SS Archive filters
 .INDENT 0.0
 .TP
-.BI \-P \ PREFIX\fP,\fB \ \-\-prefix \ PREFIX
+.BI \-P \ PREFIX\fR,\fB \ \-\-prefix \ PREFIX
 only consider archive names starting with this prefix.
 .TP
-.BI \-a \ GLOB\fP,\fB \ \-\-glob\-archives \ GLOB
+.BI \-a \ GLOB\fR,\fB \ \-\-glob\-archives \ GLOB
 only consider archive names matching the glob. sh: rules apply, see "borg help patterns". \fB\-\-prefix\fP and \fB\-\-glob\-archives\fP are mutually exclusive.
 .TP
 .BI \-\-sort\-by \ KEYS
@@ -89,7 +89,7 @@ consider last N archives after other filters were applied
 .SS Exclusion options
 .INDENT 0.0
 .TP
-.BI \-e \ PATTERN\fP,\fB \ \-\-exclude \ PATTERN
+.BI \-e \ PATTERN\fR,\fB \ \-\-exclude \ PATTERN
 exclude paths matching PATTERN
 .TP
 .BI \-\-exclude\-from \ EXCLUDEFILE
@@ -227,6 +227,10 @@ isoctime
 .IP \(bu 2
 isoatime
 .IP \(bu 2
+blake2b
+.IP \(bu 2
+blake2s
+.IP \(bu 2
 md5
 .IP \(bu 2
 sha1
@@ -237,8 +241,20 @@ sha256
 .IP \(bu 2
 sha384
 .IP \(bu 2
+sha3_224
+.IP \(bu 2
+sha3_256
+.IP \(bu 2
+sha3_384
+.IP \(bu 2
+sha3_512
+.IP \(bu 2
 sha512
 .IP \(bu 2
+shake_128
+.IP \(bu 2
+shake_256
+.IP \(bu 2
 xxh64: XXH64 checksum of this file (note: this is NOT a cryptographic hash!)
 .IP \(bu 2
 archiveid

+ 4 - 4
docs/man/borg-mount.1

@@ -1,6 +1,6 @@
 .\" Man page generated from reStructuredText.
 .
-.TH BORG-MOUNT 1 "2020-04-21" "" "borg backup tool"
+.TH BORG-MOUNT 1 "2020-10-04" "" "borg backup tool"
 .SH NAME
 borg-mount \- Mount archive or an entire repository as a FUSE filesystem
 .
@@ -105,10 +105,10 @@ Extra mount options
 .SS Archive filters
 .INDENT 0.0
 .TP
-.BI \-P \ PREFIX\fP,\fB \ \-\-prefix \ PREFIX
+.BI \-P \ PREFIX\fR,\fB \ \-\-prefix \ PREFIX
 only consider archive names starting with this prefix.
 .TP
-.BI \-a \ GLOB\fP,\fB \ \-\-glob\-archives \ GLOB
+.BI \-a \ GLOB\fR,\fB \ \-\-glob\-archives \ GLOB
 only consider archive names matching the glob. sh: rules apply, see "borg help patterns". \fB\-\-prefix\fP and \fB\-\-glob\-archives\fP are mutually exclusive.
 .TP
 .BI \-\-sort\-by \ KEYS
@@ -123,7 +123,7 @@ consider last N archives after other filters were applied
 .SS Exclusion options
 .INDENT 0.0
 .TP
-.BI \-e \ PATTERN\fP,\fB \ \-\-exclude \ PATTERN
+.BI \-e \ PATTERN\fR,\fB \ \-\-exclude \ PATTERN
 exclude paths matching PATTERN
 .TP
 .BI \-\-exclude\-from \ EXCLUDEFILE

+ 2 - 2
docs/man/borg-patterns.1

@@ -1,6 +1,6 @@
 .\" Man page generated from reStructuredText.
 .
-.TH BORG-PATTERNS 1 "2020-04-21" "" "borg backup tool"
+.TH BORG-PATTERNS 1 "2020-10-04" "" "borg backup tool"
 .SH NAME
 borg-patterns \- Details regarding patterns
 .
@@ -104,7 +104,7 @@ path separator is always removed.
 This pattern style is (only) useful to match full paths.
 This is kind of a pseudo pattern as it can not have any variable or
 unspecified parts \- the full path must be given. \fIpf:root/file.ext\fP matches
-\fIroot/file.txt\fP only. A leading path separator is always removed.
+\fIroot/file.ext\fP only. A leading path separator is always removed.
 .sp
 Implementation note: this is implemented via very time\-efficient O(1)
 hashtable lookups (this means you can have huge amounts of such patterns

+ 1 - 1
docs/man/borg-placeholders.1

@@ -1,6 +1,6 @@
 .\" Man page generated from reStructuredText.
 .
-.TH BORG-PLACEHOLDERS 1 "2020-04-21" "" "borg backup tool"
+.TH BORG-PLACEHOLDERS 1 "2020-10-04" "" "borg backup tool"
 .SH NAME
 borg-placeholders \- Details regarding placeholders
 .

+ 4 - 4
docs/man/borg-prune.1

@@ -1,6 +1,6 @@
 .\" Man page generated from reStructuredText.
 .
-.TH BORG-PRUNE 1 "2020-04-21" "" "borg backup tool"
+.TH BORG-PRUNE 1 "2020-10-04" "" "borg backup tool"
 .SH NAME
 borg-prune \- Prune repository archives according to specified rules
 .
@@ -98,7 +98,7 @@ repository to prune
 do not change repository
 .TP
 .B \-\-force
-force pruning of corrupted archives
+force pruning of corrupted archives, use \fB\-\-force \-\-force\fP in case \fB\-\-force\fP does not work.
 .TP
 .B \-s\fP,\fB  \-\-stats
 print statistics for the deleted archive
@@ -136,10 +136,10 @@ work slower, but using less space
 .SS Archive filters
 .INDENT 0.0
 .TP
-.BI \-P \ PREFIX\fP,\fB \ \-\-prefix \ PREFIX
+.BI \-P \ PREFIX\fR,\fB \ \-\-prefix \ PREFIX
 only consider archive names starting with this prefix.
 .TP
-.BI \-a \ GLOB\fP,\fB \ \-\-glob\-archives \ GLOB
+.BI \-a \ GLOB\fR,\fB \ \-\-glob\-archives \ GLOB
 only consider archive names matching the glob. sh: rules apply, see "borg help patterns". \fB\-\-prefix\fP and \fB\-\-glob\-archives\fP are mutually exclusive.
 .UNINDENT
 .SH EXAMPLES

+ 12 - 10
docs/man/borg-recreate.1

@@ -1,6 +1,6 @@
 .\" Man page generated from reStructuredText.
 .
-.TH BORG-RECREATE 1 "2020-04-21" "" "borg backup tool"
+.TH BORG-RECREATE 1 "2020-10-04" "" "borg backup tool"
 .SH NAME
 borg-recreate \- Re-create archives
 .
@@ -37,13 +37,15 @@ borg [common options] recreate [options] [REPOSITORY_OR_ARCHIVE] [PATH...]
 .sp
 Recreate the contents of existing archives.
 .sp
-This is an \fIexperimental\fP feature. Do \fInot\fP use this on your only backup.
+recreate is a potentially dangerous function and might lead to data loss
+(if used wrongly). BE VERY CAREFUL!
 .sp
 Important: Repository disk space is \fBnot\fP freed until you run \fBborg compact\fP\&.
 .sp
-\fB\-\-exclude\fP, \fB\-\-exclude\-from\fP, \fB\-\-exclude\-if\-present\fP, \fB\-\-keep\-exclude\-tags\fP, and PATH
-have the exact same semantics as in "borg create". If PATHs are specified the
-resulting archive will only contain files from these PATHs.
+\fB\-\-exclude\fP, \fB\-\-exclude\-from\fP, \fB\-\-exclude\-if\-present\fP, \fB\-\-keep\-exclude\-tags\fP
+and PATH have the exact same semantics as in "borg create", but they only check
+for files in the archives and not in the local file system. If PATHs are specified,
+the resulting archives will only contain files from these PATHs.
 .sp
 Note that all paths in an archive are relative, therefore absolute patterns/paths
 will \fInot\fP match (\fB\-\-exclude\fP, \fB\-\-exclude\-from\fP, PATHs).
@@ -61,7 +63,7 @@ Borg 1.x archives.
 Depending on the PATHs and patterns given, recreate can be used to permanently
 delete files from archives.
 When in doubt, use \fB\-\-dry\-run \-\-verbose \-\-list\fP to see how patterns/PATHS are
-interpreted.
+interpreted. See \fIlist_item_flags\fP in \fBborg create\fP for details.
 .sp
 The archive being recreated is only removed after the operation completes. The
 archive that is built during the operation exists at the same time at
@@ -113,7 +115,7 @@ print statistics at end
 .SS Exclusion options
 .INDENT 0.0
 .TP
-.BI \-e \ PATTERN\fP,\fB \ \-\-exclude \ PATTERN
+.BI \-e \ PATTERN\fR,\fB \ \-\-exclude \ PATTERN
 exclude paths matching PATTERN
 .TP
 .BI \-\-exclude\-from \ EXCLUDEFILE
@@ -140,7 +142,7 @@ if tag objects are specified with \fB\-\-exclude\-if\-present\fP, don\(aqt omit
 .BI \-\-target \ TARGET
 create a new archive with the name ARCHIVE, do not replace existing archive (only applies for a single archive)
 .TP
-.BI \-c \ SECONDS\fP,\fB \ \-\-checkpoint\-interval \ SECONDS
+.BI \-c \ SECONDS\fR,\fB \ \-\-checkpoint\-interval \ SECONDS
 write checkpoint every SECONDS seconds (Default: 1800)
 .TP
 .BI \-\-comment \ COMMENT
@@ -149,11 +151,11 @@ add a comment text to the archive
 .BI \-\-timestamp \ TIMESTAMP
 manually specify the archive creation date/time (UTC, yyyy\-mm\-ddThh:mm:ss format). alternatively, give a reference file/directory.
 .TP
-.BI \-C \ COMPRESSION\fP,\fB \ \-\-compression \ COMPRESSION
+.BI \-C \ COMPRESSION\fR,\fB \ \-\-compression \ COMPRESSION
 select compression algorithm, see the output of the "borg help compression" command for details.
 .TP
 .BI \-\-recompress \ MODE
-recompress data chunks according to \fB\-\-compression\fP\&. MODE \fIif\-different\fP: recompress if current compression is with a different compression algorithm (the level is not considered). MODE \fIalways\fP: recompress even if current compression is with the same compression algorithm (use this to change the compression level). MODE \fInever\fP (default): do not recompress.
+recompress data chunks according to \fIMODE\fP and \fB\-\-compression\fP\&. Possible modes are \fIif\-different\fP: recompress if current compression is with a different compression algorithm (the level is not considered); \fIalways\fP: recompress even if current compression is with the same compression algorithm (use this to change the compression level); and \fInever\fP: do not recompress (use this option to explicitly prevent recompression). If no MODE is given, \fIif\-different\fP will be used. Not passing \-\-recompress is equivalent to "\-\-recompress never".
 .TP
 .BI \-\-chunker\-params \ PARAMS
 specify the chunker parameters (ALGO, CHUNK_MIN_EXP, CHUNK_MAX_EXP, HASH_MASK_BITS, HASH_WINDOW_SIZE) or \fIdefault\fP to use the current defaults. default: buzhash,19,23,21,4095

+ 1 - 1
docs/man/borg-rename.1

@@ -1,6 +1,6 @@
 .\" Man page generated from reStructuredText.
 .
-.TH BORG-RENAME 1 "2020-04-21" "" "borg backup tool"
+.TH BORG-RENAME 1 "2020-10-04" "" "borg backup tool"
 .SH NAME
 borg-rename \- Rename an existing archive
 .

+ 1 - 1
docs/man/borg-serve.1

@@ -1,6 +1,6 @@
 .\" Man page generated from reStructuredText.
 .
-.TH BORG-SERVE 1 "2020-04-21" "" "borg backup tool"
+.TH BORG-SERVE 1 "2020-10-04" "" "borg backup tool"
 .SH NAME
 borg-serve \- Start in server mode. This command is usually not used manually.
 .

+ 1 - 1
docs/man/borg-umount.1

@@ -1,6 +1,6 @@
 .\" Man page generated from reStructuredText.
 .
-.TH BORG-UMOUNT 1 "2020-04-21" "" "borg backup tool"
+.TH BORG-UMOUNT 1 "2020-10-04" "" "borg backup tool"
 .SH NAME
 borg-umount \- un-mount the FUSE filesystem
 .

+ 1 - 1
docs/man/borg-upgrade.1

@@ -1,6 +1,6 @@
 .\" Man page generated from reStructuredText.
 .
-.TH BORG-UPGRADE 1 "2020-04-21" "" "borg backup tool"
+.TH BORG-UPGRADE 1 "2020-10-04" "" "borg backup tool"
 .SH NAME
 borg-upgrade \- upgrade a repository from a previous version
 .

+ 1 - 1
docs/man/borg-with-lock.1

@@ -1,6 +1,6 @@
 .\" Man page generated from reStructuredText.
 .
-.TH BORG-WITH-LOCK 1 "2020-04-21" "" "borg backup tool"
+.TH BORG-WITH-LOCK 1 "2020-10-04" "" "borg backup tool"
 .SH NAME
 borg-with-lock \- run a user specified command with the repository lock held
 .

+ 4 - 7
docs/man/borg.1

@@ -1,6 +1,6 @@
 .\" Man page generated from reStructuredText.
 .
-.TH BORG 1 "2020-04-21" "" "borg backup tool"
+.TH BORG 1 "2020-10-04" "" "borg backup tool"
 .SH NAME
 borg \- deduplicating and encrypting backup tool
 .
@@ -477,13 +477,10 @@ For "Warning: Attempting to access a previously unknown unencrypted repository"
 For "Warning: The repository at location ... was previously located at ..."
 .TP
 .B BORG_CHECK_I_KNOW_WHAT_I_AM_DOING=NO (or =YES)
-For "Warning: \(aqcheck \-\-repair\(aq is an experimental feature that might result in data loss."
+For "This is a potentially dangerous function..." (check \-\-repair)
 .TP
 .B BORG_DELETE_I_KNOW_WHAT_I_AM_DOING=NO (or =YES)
 For "You requested to completely DELETE the repository \fIincluding\fP all archives it contains:"
-.TP
-.B BORG_RECREATE_I_KNOW_WHAT_I_AM_DOING=NO (or =YES)
-For "recreate is an experimental feature."
 .UNINDENT
 .sp
 Note: answers are case sensitive. setting an invalid answer value might either give the default
@@ -588,7 +585,7 @@ Up to 1000 files per directory (10000 for repositories initialized with Borg 1.0
 rename(2) / MoveFile(Ex) should work as specified, i.e. on the same file system
 it should be a move (not a copy) operation, and in case of a directory
 it should fail if the destination exists and is not an empty directory,
-since this is used for locking
+since this is used for locking.
 .IP \(bu 2
 Hardlinks are needed for \fIborg_upgrade\fP \fB\-\-inplace\fP
 .UNINDENT
@@ -694,7 +691,7 @@ default temporary directory at /tmp. This can be remediated by ensuring the
 $TMPDIR, $TEMP, or $TMP environment variable is properly set for the sshd
 process.
 For some OSes, this can be done just by setting the correct value in the
-.bashrc (or equivalent login config file for other shells), however in
+\&.bashrc (or equivalent login config file for other shells), however in
 other cases it may be necessary to first enable \fBPermitUserEnvironment yes\fP
 in your \fBsshd_config\fP file, then add \fBenvironment="TMPDIR=/my/big/tmpdir"\fP
 at the start of the public key to be used in the \fBauthorized_hosts\fP file.

+ 4 - 4
docs/man/borgfs.1

@@ -1,6 +1,6 @@
 .\" Man page generated from reStructuredText.
 .
-.TH BORGFS 1 "2020-04-21" "" "borg backup tool"
+.TH BORGFS 1 "2020-10-04" "" "borg backup tool"
 .SH NAME
 borgfs \- Mount archive or an entire repository as a FUSE filesystem
 .
@@ -108,10 +108,10 @@ Extra mount options
 .SS Archive filters
 .INDENT 0.0
 .TP
-.BI \-P \ PREFIX\fP,\fB \ \-\-prefix \ PREFIX
+.BI \-P \ PREFIX\fR,\fB \ \-\-prefix \ PREFIX
 only consider archive names starting with this prefix.
 .TP
-.BI \-a \ GLOB\fP,\fB \ \-\-glob\-archives \ GLOB
+.BI \-a \ GLOB\fR,\fB \ \-\-glob\-archives \ GLOB
 only consider archive names matching the glob. sh: rules apply, see "borg help patterns". \fB\-\-prefix\fP and \fB\-\-glob\-archives\fP are mutually exclusive.
 .TP
 .BI \-\-sort\-by \ KEYS
@@ -126,7 +126,7 @@ consider last N archives after other filters were applied
 .SS Exclusion options
 .INDENT 0.0
 .TP
-.BI \-e \ PATTERN\fP,\fB \ \-\-exclude \ PATTERN
+.BI \-e \ PATTERN\fR,\fB \ \-\-exclude \ PATTERN
 exclude paths matching PATTERN
 .TP
 .BI \-\-exclude\-from \ EXCLUDEFILE

+ 3 - 0
docs/usage/check.rst.inc

@@ -87,6 +87,9 @@ Description
 
 The check command verifies the consistency of a repository and the corresponding archives.
 
+check --repair is a potentially dangerous function and might lead to data loss
+(for kinds of corruption it is not capable of dealing with). BE VERY CAREFUL!
+
 First, the underlying repository data files are checked:
 
 - For all segments, the segment magic header is checked.

+ 1 - 1
docs/usage/common-options.rst.inc

@@ -11,7 +11,7 @@
 --bypass-lock      Bypass locking mechanism
 --show-version     show/log the borg version
 --show-rc          show/log the return code (rc)
---umask M          set umask to M (local and remote, default: 0077)
+--umask M          set umask to M (local only, default: 0077)
 --remote-path PATH    use PATH as borg executable on the remote (default: "borg")
 --remote-ratelimit RATE    set remote network upload rate limit in kiByte/s (default: 0=unlimited)
 --consider-part-files    treat part files like normal files (e.g. to list/extract them)

+ 44 - 4
docs/usage/create.rst.inc

@@ -33,7 +33,9 @@ borg create
     +-------------------------------------------------------+---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+
     |                                                       | ``--no-cache-sync``                               | experimental: do not synchronize the cache. Implies not using the files cache.                                                                    |
     +-------------------------------------------------------+---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+
-    |                                                       | ``--stdin-name NAME``                             | use NAME in archive for stdin data (default: "stdin")                                                                                             |
+    |                                                       | ``--stdin-name NAME``                             | use NAME in archive for stdin data (default: 'stdin')                                                                                             |
+    +-------------------------------------------------------+---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+
+    |                                                       | ``--content-from-command``                        | interpret PATH as command and store its stdout. See also section Reading from stdin below.                                                        |
     +-------------------------------------------------------+---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+
     | .. class:: borg-common-opt-ref                                                                                                                                                                                                                                |
     |                                                                                                                                                                                                                                                               |
@@ -115,7 +117,8 @@ borg create
         --filter STATUSCHARS    only display items with the given status characters (see description)
         --json          output stats as JSON. Implies ``--stats``.
         --no-cache-sync    experimental: do not synchronize the cache. Implies not using the files cache.
-        --stdin-name NAME    use NAME in archive for stdin data (default: "stdin")
+        --stdin-name NAME    use NAME in archive for stdin data (default: 'stdin')
+        --content-from-command    interpret PATH as command and store its stdout. See also section Reading from stdin below.
 
 
     :ref:`common_options`
@@ -162,7 +165,9 @@ that means if relative paths are desired, the command has to be run from the cor
 directory.
 
 When giving '-' as path, borg will read data from standard input and create a
-file 'stdin' in the created archive from that data.
+file 'stdin' in the created archive from that data. In some cases it's more
+appropriate to use --content-from-command, however. See section *Reading from
+stdin* below for details.
 
 The archive will consume almost no disk space for files or parts of files that
 have already been stored in other archives.
@@ -243,6 +248,8 @@ only include the objects specified by ``--exclude-if-present`` in your backup,
 and not include any other contents of the containing folder, this can be enabled
 through using the ``--keep-exclude-tags`` option.
 
+.. _list_item_flags:
+
 Item flags
 ++++++++++
 
@@ -281,4 +288,37 @@ Other flags used include:
 - 'i' = backup data was read from standard input (stdin)
 - '-' = dry run, item was *not* backed up
 - 'x' = excluded, item was *not* backed up
-- '?' = missing status code (if you see this, please file a bug report!)
+- '?' = missing status code (if you see this, please file a bug report!)
+
+Reading from stdin
+++++++++++++++++++
+
+There are two methods to read from stdin. Either specify ``-`` as path and
+pipe directly to borg::
+
+    backup-vm --id myvm --stdout | borg create REPO::ARCHIVE -
+
+Or use ``--content-from-command`` to have Borg manage the execution of the
+command and piping. If you do so, the first PATH argument is interpreted
+as command to execute and any further arguments are treated as arguments
+to the command::
+
+    borg create --content-from-command REPO::ARCHIVE -- backup-vm --id myvm --stdout
+
+``--`` is used to ensure ``--id`` and ``--stdout`` are **not** considered
+arguments to ``borg`` but rather ``backup-vm``.
+
+The difference between the two approaches is that piping to borg creates an
+archive even if the command piping to borg exits with a failure. In this case,
+**one can end up with truncated output being backed up**. Using
+``--content-from-command``, in contrast, borg is guaranteed to fail without
+creating an archive should the command fail. The command is considered failed
+when it returned a non-zero exit code.
+
+Reading from stdin yields just a stream of data without file metadata
+associated with it, and the files cache is not needed at all. So it is
+safe to disable it via ``--files-cache disabled`` and speed up backup
+creation a bit.
+
+By default, the content read from stdin is stored in a file called 'stdin'.
+Use ``--stdin-name`` to change the name.

+ 1 - 1
docs/usage/help.rst.inc

@@ -77,7 +77,7 @@ Path full-match, selector `pf:`
     This pattern style is (only) useful to match full paths.
     This is kind of a pseudo pattern as it can not have any variable or
     unspecified parts - the full path must be given. `pf:root/file.ext` matches
-    `root/file.txt` only. A leading path separator is always removed.
+    `root/file.ext` only. A leading path separator is always removed.
 
     Implementation note: this is implemented via very time-efficient O(1)
     hashtable lookups (this means you can have huge amounts of such patterns

+ 10 - 1
docs/usage/key_import.rst.inc

@@ -58,4 +58,13 @@ This command restores a key previously backed up with the export command.
 
 If the ``--paper`` option is given, the import will be an interactive
 process in which each line is checked for plausibility before
-proceeding to the next line. For this format PATH must not be given.
+proceeding to the next line. For this format PATH must not be given.
+
+For repositories using keyfile encryption, the key file which ``borg key
+import`` writes to depends on several factors. If the ``BORG_KEY_FILE``
+environment variable is set and non-empty, ``borg key import`` creates
+or overwrites that file named by ``$BORG_KEY_FILE``. Otherwise, ``borg
+key import`` searches in the ``$BORG_KEYS_DIR`` directory for a key file
+associated with the repository. If a key file is found in
+``$BORG_KEYS_DIR``, ``borg key import`` overwrites it; otherwise, ``borg
+key import`` creates a new key file in ``$BORG_KEYS_DIR``.

+ 8 - 0
docs/usage/list.rst.inc

@@ -164,12 +164,20 @@ Keys for listing archive files:
 - isoctime
 - isoatime
 
+- blake2b
+- blake2s
 - md5
 - sha1
 - sha224
 - sha256
 - sha384
+- sha3_224
+- sha3_256
+- sha3_384
+- sha3_512
 - sha512
+- shake_128
+- shake_256
 - xxh64: XXH64 checksum of this file (note: this is NOT a cryptographic hash!)
 
 - archiveid

+ 2 - 2
docs/usage/prune.rst.inc

@@ -21,7 +21,7 @@ borg prune
     +-----------------------------------------------------------------------------+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+
     |                                                                             | ``-n``, ``--dry-run``                 | do not change repository                                                                                                                               |
     +-----------------------------------------------------------------------------+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+
-    |                                                                             | ``--force``                           | force pruning of corrupted archives                                                                                                                    |
+    |                                                                             | ``--force``                           | force pruning of corrupted archives, use ``--force --force`` in case ``--force`` does not work.                                                        |
     +-----------------------------------------------------------------------------+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+
     |                                                                             | ``-s``, ``--stats``                   | print statistics for the deleted archive                                                                                                               |
     +-----------------------------------------------------------------------------+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+
@@ -72,7 +72,7 @@ borg prune
 
     optional arguments
         -n, --dry-run         do not change repository
-        --force               force pruning of corrupted archives
+        --force               force pruning of corrupted archives, use ``--force --force`` in case ``--force`` does not work.
         -s, --stats           print statistics for the deleted archive
         --list                output verbose list of archives it keeps/prunes
         --keep-within INTERVAL    keep all archives within this time interval

+ 61 - 59
docs/usage/recreate.rst.inc

@@ -12,59 +12,59 @@ borg recreate
 
     .. class:: borg-options-table
 
-    +-------------------------------------------------------+---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
-    | **positional arguments**                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
-    +-------------------------------------------------------+---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
-    |                                                       | ``REPOSITORY_OR_ARCHIVE``                         | repository or archive to recreate                                                                                                                                                                                                                                                                                                                                          |
-    +-------------------------------------------------------+---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
-    |                                                       | ``PATH``                                          | paths to recreate; patterns are supported                                                                                                                                                                                                                                                                                                                                  |
-    +-------------------------------------------------------+---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
-    | **optional arguments**                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
-    +-------------------------------------------------------+---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
-    |                                                       | ``--list``                                        | output verbose list of items (files, dirs, ...)                                                                                                                                                                                                                                                                                                                            |
-    +-------------------------------------------------------+---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
-    |                                                       | ``--filter STATUSCHARS``                          | only display items with the given status characters (listed in borg create --help)                                                                                                                                                                                                                                                                                         |
-    +-------------------------------------------------------+---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
-    |                                                       | ``-n``, ``--dry-run``                             | do not change anything                                                                                                                                                                                                                                                                                                                                                     |
-    +-------------------------------------------------------+---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
-    |                                                       | ``-s``, ``--stats``                               | print statistics at end                                                                                                                                                                                                                                                                                                                                                    |
-    +-------------------------------------------------------+---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
-    | .. class:: borg-common-opt-ref                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
-    |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
-    | :ref:`common_options`                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
-    +-------------------------------------------------------+---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
-    | **Exclusion options**                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
-    +-------------------------------------------------------+---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
-    |                                                       | ``-e PATTERN``, ``--exclude PATTERN``             | exclude paths matching PATTERN                                                                                                                                                                                                                                                                                                                                             |
-    +-------------------------------------------------------+---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
-    |                                                       | ``--exclude-from EXCLUDEFILE``                    | read exclude patterns from EXCLUDEFILE, one per line                                                                                                                                                                                                                                                                                                                       |
-    +-------------------------------------------------------+---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
-    |                                                       | ``--pattern PATTERN``                             | experimental: include/exclude paths matching PATTERN                                                                                                                                                                                                                                                                                                                       |
-    +-------------------------------------------------------+---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
-    |                                                       | ``--patterns-from PATTERNFILE``                   | experimental: read include/exclude patterns from PATTERNFILE, one per line                                                                                                                                                                                                                                                                                                 |
-    +-------------------------------------------------------+---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
-    |                                                       | ``--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                                                                                                                                                                                                                                                  |
-    +-------------------------------------------------------+---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
-    | **Archive options**                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
-    +-------------------------------------------------------+---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
-    |                                                       | ``--target TARGET``                               | create a new archive with the name ARCHIVE, do not replace existing archive (only applies for a single archive)                                                                                                                                                                                                                                                            |
-    +-------------------------------------------------------+---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
-    |                                                       | ``-c SECONDS``, ``--checkpoint-interval SECONDS`` | write checkpoint every SECONDS seconds (Default: 1800)                                                                                                                                                                                                                                                                                                                     |
-    +-------------------------------------------------------+---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
-    |                                                       | ``--comment COMMENT``                             | add a comment text to the archive                                                                                                                                                                                                                                                                                                                                          |
-    +-------------------------------------------------------+---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
-    |                                                       | ``--timestamp TIMESTAMP``                         | manually specify the archive creation date/time (UTC, yyyy-mm-ddThh:mm:ss format). alternatively, give a reference file/directory.                                                                                                                                                                                                                                         |
-    +-------------------------------------------------------+---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
-    |                                                       | ``-C COMPRESSION``, ``--compression COMPRESSION`` | select compression algorithm, see the output of the "borg help compression" command for details.                                                                                                                                                                                                                                                                           |
-    +-------------------------------------------------------+---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
-    |                                                       | ``--recompress MODE``                             | recompress data chunks according to ``--compression``. MODE `if-different`: recompress if current compression is with a different compression algorithm (the level is not considered). MODE `always`: recompress even if current compression is with the same compression algorithm (use this to change the compression level). MODE `never` (default): do not recompress. |
-    +-------------------------------------------------------+---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
-    |                                                       | ``--chunker-params PARAMS``                       | specify the chunker parameters (ALGO, CHUNK_MIN_EXP, CHUNK_MAX_EXP, HASH_MASK_BITS, HASH_WINDOW_SIZE) or `default` to use the current defaults. default: buzhash,19,23,21,4095                                                                                                                                                                                             |
-    +-------------------------------------------------------+---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+    +-------------------------------------------------------+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+    | **positional arguments**                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
+    +-------------------------------------------------------+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+    |                                                       | ``REPOSITORY_OR_ARCHIVE``                         | repository or archive to recreate                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
+    +-------------------------------------------------------+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+    |                                                       | ``PATH``                                          | paths to recreate; patterns are supported                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
+    +-------------------------------------------------------+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+    | **optional arguments**                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
+    +-------------------------------------------------------+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+    |                                                       | ``--list``                                        | output verbose list of items (files, dirs, ...)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
+    +-------------------------------------------------------+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+    |                                                       | ``--filter STATUSCHARS``                          | only display items with the given status characters (listed in borg create --help)                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
+    +-------------------------------------------------------+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+    |                                                       | ``-n``, ``--dry-run``                             | do not change anything                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
+    +-------------------------------------------------------+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+    |                                                       | ``-s``, ``--stats``                               | print statistics at end                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
+    +-------------------------------------------------------+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+    | .. class:: borg-common-opt-ref                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
+    |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
+    | :ref:`common_options`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
+    +-------------------------------------------------------+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+    | **Exclusion options**                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
+    +-------------------------------------------------------+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+    |                                                       | ``-e PATTERN``, ``--exclude PATTERN``             | exclude paths matching PATTERN                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
+    +-------------------------------------------------------+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+    |                                                       | ``--exclude-from EXCLUDEFILE``                    | read exclude patterns from EXCLUDEFILE, one per line                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
+    +-------------------------------------------------------+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+    |                                                       | ``--pattern PATTERN``                             | experimental: include/exclude paths matching PATTERN                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
+    +-------------------------------------------------------+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+    |                                                       | ``--patterns-from PATTERNFILE``                   | experimental: read include/exclude patterns from PATTERNFILE, one per line                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
+    +-------------------------------------------------------+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+    |                                                       | ``--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                                                                                                                                                                                                                                                                                                                                                                                                                                   |
+    +-------------------------------------------------------+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+    | **Archive options**                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
+    +-------------------------------------------------------+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+    |                                                       | ``--target TARGET``                               | create a new archive with the name ARCHIVE, do not replace existing archive (only applies for a single archive)                                                                                                                                                                                                                                                                                                                                                                                                                                             |
+    +-------------------------------------------------------+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+    |                                                       | ``-c SECONDS``, ``--checkpoint-interval SECONDS`` | write checkpoint every SECONDS seconds (Default: 1800)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
+    +-------------------------------------------------------+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+    |                                                       | ``--comment COMMENT``                             | add a comment text to the archive                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
+    +-------------------------------------------------------+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+    |                                                       | ``--timestamp TIMESTAMP``                         | manually specify the archive creation date/time (UTC, yyyy-mm-ddThh:mm:ss format). alternatively, give a reference file/directory.                                                                                                                                                                                                                                                                                                                                                                                                                          |
+    +-------------------------------------------------------+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+    |                                                       | ``-C COMPRESSION``, ``--compression COMPRESSION`` | select compression algorithm, see the output of the "borg help compression" command for details.                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
+    +-------------------------------------------------------+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+    |                                                       | ``--recompress MODE``                             | recompress data chunks according to `MODE` and ``--compression``. Possible modes are `if-different`: recompress if current compression is with a different compression algorithm (the level is not considered); `always`: recompress even if current compression is with the same compression algorithm (use this to change the compression level); and `never`: do not recompress (use this option to explicitly prevent recompression). If no MODE is given, `if-different` will be used. Not passing --recompress is equivalent to "--recompress never". |
+    +-------------------------------------------------------+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+    |                                                       | ``--chunker-params PARAMS``                       | specify the chunker parameters (ALGO, CHUNK_MIN_EXP, CHUNK_MAX_EXP, HASH_MASK_BITS, HASH_WINDOW_SIZE) or `default` to use the current defaults. default: buzhash,19,23,21,4095                                                                                                                                                                                                                                                                                                                                                                              |
+    +-------------------------------------------------------+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
 
     .. raw:: html
 
@@ -108,7 +108,7 @@ borg recreate
         --comment COMMENT                             add a comment text to the archive
         --timestamp TIMESTAMP                         manually specify the archive creation date/time (UTC, yyyy-mm-ddThh:mm:ss format). alternatively, give a reference file/directory.
         -C COMPRESSION, --compression COMPRESSION     select compression algorithm, see the output of the "borg help compression" command for details.
-        --recompress MODE                             recompress data chunks according to ``--compression``. MODE `if-different`: recompress if current compression is with a different compression algorithm (the level is not considered). MODE `always`: recompress even if current compression is with the same compression algorithm (use this to change the compression level). MODE `never` (default): do not recompress.
+        --recompress MODE                             recompress data chunks according to `MODE` and ``--compression``. Possible modes are `if-different`: recompress if current compression is with a different compression algorithm (the level is not considered); `always`: recompress even if current compression is with the same compression algorithm (use this to change the compression level); and `never`: do not recompress (use this option to explicitly prevent recompression). If no MODE is given, `if-different` will be used. Not passing --recompress is equivalent to "--recompress never".
         --chunker-params PARAMS                       specify the chunker parameters (ALGO, CHUNK_MIN_EXP, CHUNK_MAX_EXP, HASH_MASK_BITS, HASH_WINDOW_SIZE) or `default` to use the current defaults. default: buzhash,19,23,21,4095
 
 
@@ -117,13 +117,15 @@ Description
 
 Recreate the contents of existing archives.
 
-This is an *experimental* feature. Do *not* use this on your only backup.
+recreate is a potentially dangerous function and might lead to data loss
+(if used wrongly). BE VERY CAREFUL!
 
 Important: Repository disk space is **not** freed until you run ``borg compact``.
 
-``--exclude``, ``--exclude-from``, ``--exclude-if-present``, ``--keep-exclude-tags``, and PATH
-have the exact same semantics as in "borg create". If PATHs are specified the
-resulting archive will only contain files from these PATHs.
+``--exclude``, ``--exclude-from``, ``--exclude-if-present``, ``--keep-exclude-tags``
+and PATH have the exact same semantics as in "borg create", but they only check
+for files in the archives and not in the local file system. If PATHs are specified,
+the resulting archives will only contain files from these PATHs.
 
 Note that all paths in an archive are relative, therefore absolute patterns/paths
 will *not* match (``--exclude``, ``--exclude-from``, PATHs).
@@ -141,7 +143,7 @@ Borg 1.x archives.
 Depending on the PATHs and patterns given, recreate can be used to permanently
 delete files from archives.
 When in doubt, use ``--dry-run --verbose --list`` to see how patterns/PATHS are
-interpreted.
+interpreted. See :ref:`list_item_flags` in ``borg create`` for details.
 
 The archive being recreated is only removed after the operation completes. The
 archive that is built during the operation exists at the same time at

+ 2 - 2
requirements.d/fuse.txt

@@ -1,4 +1,4 @@
 # low-level FUSE support library for "borg mount"
 # please see the comments in setup.py about llfuse.
-llfuse<2.0
-
+llfuse >=1.3.4, <1.3.7; python_version <"3.9"  # broken on py39
+llfuse >=1.3.7, <2.0; python_version >="3.9"  # broken on freebsd

+ 1 - 2
scripts/borg.exe.spec

@@ -7,12 +7,11 @@ is_win32 = sys.platform.startswith('win32')
 
 # Note: SPEC contains the spec file argument given to pyinstaller
 here = os.path.dirname(os.path.abspath(SPEC))
+basepath = os.path.abspath(os.path.join(here, '..'))
 
 if is_win32:
-    basepath = os.path.abspath(os.path.join(here, '..'))
     hiddenimports = []
 else:
-    basepath = '/vagrant/borg/borg'
     hiddenimports = ['borg.platform.posix', 'pkg_resources.py2_warn', ]
 
 block_cipher = None

+ 3 - 3
setup.py

@@ -10,10 +10,10 @@ try:
 except ImportError:
     multiprocessing = None
 
-from distutils.command.clean import clean
 from setuptools.command.build_ext import build_ext
 from setuptools import setup, find_packages, Extension
 from setuptools.command.sdist import sdist
+from distutils.command.clean import clean
 
 try:
     from Cython.Build import cythonize
@@ -83,8 +83,8 @@ install_requires = [
 # if you do not have llfuse, do not require it, most of borgbackup will work.
 extras_require = {
     'fuse': [
-        'llfuse >=1.3, <2.0',
-        'llfuse >=1.3.4, <2.0; python_version >="3.7"',
+        'llfuse >=1.3.4, <1.3.7; python_version <"3.9"',  # broken on py39
+        'llfuse >=1.3.7, <2.0; python_version >="3.9"',  # broken on freebsd
     ],
 }