diff --git a/docs/changes.rst b/docs/changes.rst index 93b6738d6..90be2b0bb 100644 --- a/docs/changes.rst +++ b/docs/changes.rst @@ -120,7 +120,7 @@ Compatibility notes: Change Log 2.x ============== -Version 2.0.0b9 (2024-07-xx) +Version 2.0.0b9 (2024-07-20) ---------------------------- Please note: @@ -139,6 +139,7 @@ New features: Requires to run "borg check --repair --archives-only" to delete orphaned chunks before running "borg compact" to free space! These orphans are expected due to the simplified refcounting with the AdHocFilesCache. +- make BORG_EXIT_CODES="modern" the default, #8110 - add BORG_USE_CHUNKS_ARCHIVE env var, #8280 - automatically rebuild cache on exception, #5213 @@ -152,6 +153,7 @@ Bug fixes: - create: deal with EBUSY, #8123 - benchmark: inherit options --rsh --remote-path, #8099 - benchmark: fix return value, #8113 +- key export: fix crash when no path is given, fix exception handling Other changes: diff --git a/docs/man/borg-benchmark-cpu.1 b/docs/man/borg-benchmark-cpu.1 index 9e911e3fc..50cca65ac 100644 --- a/docs/man/borg-benchmark-cpu.1 +++ b/docs/man/borg-benchmark-cpu.1 @@ -27,7 +27,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "BORG-BENCHMARK-CPU" 1 "2024-02-20" "" "borg backup tool" +.TH "BORG-BENCHMARK-CPU" 1 "2024-07-19" "" "borg backup tool" .SH NAME borg-benchmark-cpu \- Benchmark CPU bound operations. .SH SYNOPSIS diff --git a/docs/man/borg-benchmark-crud.1 b/docs/man/borg-benchmark-crud.1 index a75d8a48b..e4efc752f 100644 --- a/docs/man/borg-benchmark-crud.1 +++ b/docs/man/borg-benchmark-crud.1 @@ -27,7 +27,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "BORG-BENCHMARK-CRUD" 1 "2024-02-20" "" "borg backup tool" +.TH "BORG-BENCHMARK-CRUD" 1 "2024-07-19" "" "borg backup tool" .SH NAME borg-benchmark-crud \- Benchmark Create, Read, Update, Delete for archives. .SH SYNOPSIS diff --git a/docs/man/borg-benchmark.1 b/docs/man/borg-benchmark.1 index 2587296ea..4dd0fcb5f 100644 --- a/docs/man/borg-benchmark.1 +++ b/docs/man/borg-benchmark.1 @@ -27,7 +27,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "BORG-BENCHMARK" 1 "2024-02-20" "" "borg backup tool" +.TH "BORG-BENCHMARK" 1 "2024-07-19" "" "borg backup tool" .SH NAME borg-benchmark \- benchmark command .SH SYNOPSIS diff --git a/docs/man/borg-break-lock.1 b/docs/man/borg-break-lock.1 index fc23a1e2e..3bb5d2441 100644 --- a/docs/man/borg-break-lock.1 +++ b/docs/man/borg-break-lock.1 @@ -27,7 +27,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "BORG-BREAK-LOCK" 1 "2024-02-20" "" "borg backup tool" +.TH "BORG-BREAK-LOCK" 1 "2024-07-19" "" "borg backup tool" .SH NAME borg-break-lock \- Break the repository lock (e.g. in case it was left by a dead borg. .SH SYNOPSIS diff --git a/docs/man/borg-check.1 b/docs/man/borg-check.1 index 215cd2d16..b4040573c 100644 --- a/docs/man/borg-check.1 +++ b/docs/man/borg-check.1 @@ -27,7 +27,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "BORG-CHECK" 1 "2024-02-20" "" "borg backup tool" +.TH "BORG-CHECK" 1 "2024-07-19" "" "borg backup tool" .SH NAME borg-check \- Check repository consistency .SH SYNOPSIS @@ -155,7 +155,7 @@ Consequently, if lost chunks were repaired earlier, it is advised to run .SH OPTIONS .sp See \fIborg\-common(1)\fP for common options of Borg commands. -.SS options +.SS optional arguments .INDENT 0.0 .TP .B \-\-repository\-only diff --git a/docs/man/borg-common.1 b/docs/man/borg-common.1 index 61cd887d1..ad10ac4a9 100644 --- a/docs/man/borg-common.1 +++ b/docs/man/borg-common.1 @@ -27,7 +27,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "BORG-COMMON" 1 "2024-02-20" "" "borg backup tool" +.TH "BORG-COMMON" 1 "2024-07-19" "" "borg backup tool" .SH NAME borg-common \- Common options of Borg commands .SH SYNOPSIS diff --git a/docs/man/borg-compact.1 b/docs/man/borg-compact.1 index d7f7e59b5..31c5d1cdb 100644 --- a/docs/man/borg-compact.1 +++ b/docs/man/borg-compact.1 @@ -27,7 +27,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "BORG-COMPACT" 1 "2024-02-20" "" "borg backup tool" +.TH "BORG-COMPACT" 1 "2024-07-19" "" "borg backup tool" .SH NAME borg-compact \- compact segment files in the repository .SH SYNOPSIS @@ -55,7 +55,7 @@ See \fIseparate_compaction\fP in Additional Notes for more details. .SH OPTIONS .sp See \fIborg\-common(1)\fP for common options of Borg commands. -.SS options +.SS optional arguments .INDENT 0.0 .TP .BI \-\-threshold \ PERCENT diff --git a/docs/man/borg-compression.1 b/docs/man/borg-compression.1 index fb0abf231..22c69ce71 100644 --- a/docs/man/borg-compression.1 +++ b/docs/man/borg-compression.1 @@ -27,7 +27,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "BORG-COMPRESSION" 1 "2024-02-20" "" "borg backup tool" +.TH "BORG-COMPRESSION" 1 "2024-07-19" "" "borg backup tool" .SH NAME borg-compression \- Details regarding compression .SH DESCRIPTION diff --git a/docs/man/borg-config.1 b/docs/man/borg-config.1 index e34a40e9f..6cdac59f0 100644 --- a/docs/man/borg-config.1 +++ b/docs/man/borg-config.1 @@ -27,7 +27,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "BORG-CONFIG" 1 "2024-02-20" "" "borg backup tool" +.TH "BORG-CONFIG" 1 "2024-07-19" "" "borg backup tool" .SH NAME borg-config \- get, set, and delete values in a repository or cache config file .SH SYNOPSIS @@ -39,7 +39,7 @@ This command gets and sets options in a local repository or cache config file. For security reasons, this command only works on local repositories. .sp To delete a config value entirely, use \fB\-\-delete\fP\&. To list the values -of the configuration file or the default values, use \fB\-\-list\fP\&. To get and existing +of the configuration file or the default values, use \fB\-\-list\fP\&. To get an existing key, pass only the key name. To set a key, pass both the key name and the new value. Keys can be specified in the format \(dqsection.name\(dq or simply \(dqname\(dq; the section will default to \(dqrepository\(dq and \(dqcache\(dq for @@ -59,7 +59,7 @@ name of config key .B VALUE new value for key .UNINDENT -.SS options +.SS optional arguments .INDENT 0.0 .TP .B \-c\fP,\fB \-\-cache diff --git a/docs/man/borg-create.1 b/docs/man/borg-create.1 index 8014b36f3..d0616c639 100644 --- a/docs/man/borg-create.1 +++ b/docs/man/borg-create.1 @@ -27,7 +27,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "BORG-CREATE" 1 "2024-02-20" "" "borg backup tool" +.TH "BORG-CREATE" 1 "2024-07-19" "" "borg backup tool" .SH NAME borg-create \- Create new archive .SH SYNOPSIS @@ -137,7 +137,7 @@ specify the archive name .B PATH paths to archive .UNINDENT -.SS options +.SS optional arguments .INDENT 0.0 .TP .B \-n\fP,\fB \-\-dry\-run @@ -156,7 +156,13 @@ only display items with the given status characters (see description) output stats as JSON. Implies \fB\-\-stats\fP\&. .TP .B \-\-no\-cache\-sync -experimental: do not synchronize the cache. Implies not using the files cache. +experimental: do not synchronize the chunks cache. +.TP +.B \-\-no\-cache\-sync\-forced +experimental: do not synchronize the chunks cache (forced). +.TP +.B \-\-prefer\-adhoc\-cache +experimental: prefer AdHocCache (w/o files cache) over AdHocWithFilesCache (with files cache). .TP .BI \-\-stdin\-name \ NAME use NAME in archive for stdin data (default: \(aqstdin\(aq) diff --git a/docs/man/borg-delete.1 b/docs/man/borg-delete.1 index 844d9e79e..9e8baf0f4 100644 --- a/docs/man/borg-delete.1 +++ b/docs/man/borg-delete.1 @@ -27,7 +27,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "BORG-DELETE" 1 "2024-02-20" "" "borg backup tool" +.TH "BORG-DELETE" 1 "2024-07-19" "" "borg backup tool" .SH NAME borg-delete \- Delete archives .SH SYNOPSIS @@ -55,7 +55,7 @@ Always first use \fB\-\-dry\-run \-\-list\fP to see what would be deleted. .SH OPTIONS .sp See \fIborg\-common(1)\fP for common options of Borg commands. -.SS options +.SS optional arguments .INDENT 0.0 .TP .B \-n\fP,\fB \-\-dry\-run diff --git a/docs/man/borg-diff.1 b/docs/man/borg-diff.1 index 9a2d481e5..ab9e24f77 100644 --- a/docs/man/borg-diff.1 +++ b/docs/man/borg-diff.1 @@ -27,7 +27,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "BORG-DIFF" 1 "2024-02-20" "" "borg backup tool" +.TH "BORG-DIFF" 1 "2024-07-19" "" "borg backup tool" .SH NAME borg-diff \- Diff contents of two archives .SH SYNOPSIS @@ -53,7 +53,7 @@ ARCHIVE2 name .B PATH paths of items inside the archives to compare; patterns are supported .UNINDENT -.SS options +.SS optional arguments .INDENT 0.0 .TP .B \-\-numeric\-ids diff --git a/docs/man/borg-export-tar.1 b/docs/man/borg-export-tar.1 index 4a9dde498..53632e171 100644 --- a/docs/man/borg-export-tar.1 +++ b/docs/man/borg-export-tar.1 @@ -27,7 +27,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "BORG-EXPORT-TAR" 1 "2024-02-20" "" "borg backup tool" +.TH "BORG-EXPORT-TAR" 1 "2024-07-19" "" "borg backup tool" .SH NAME borg-export-tar \- Export archive contents as a tarball .SH SYNOPSIS @@ -124,7 +124,7 @@ output tar file. \(dq\-\(dq to write to stdout instead. .B PATH paths to extract; patterns are supported .UNINDENT -.SS options +.SS optional arguments .INDENT 0.0 .TP .B \-\-tar\-filter diff --git a/docs/man/borg-extract.1 b/docs/man/borg-extract.1 index 854813d16..33585fd97 100644 --- a/docs/man/borg-extract.1 +++ b/docs/man/borg-extract.1 @@ -27,7 +27,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "BORG-EXTRACT" 1 "2024-02-20" "" "borg backup tool" +.TH "BORG-EXTRACT" 1 "2024-07-19" "" "borg backup tool" .SH NAME borg-extract \- Extract archive contents .SH SYNOPSIS @@ -72,7 +72,7 @@ specify the archive name .B PATH paths to extract; patterns are supported .UNINDENT -.SS options +.SS optional arguments .INDENT 0.0 .TP .B \-\-list diff --git a/docs/man/borg-import-tar.1 b/docs/man/borg-import-tar.1 index 5bedab833..1b0be536d 100644 --- a/docs/man/borg-import-tar.1 +++ b/docs/man/borg-import-tar.1 @@ -27,7 +27,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "BORG-IMPORT-TAR" 1 "2024-02-20" "" "borg backup tool" +.TH "BORG-IMPORT-TAR" 1 "2024-07-19" "" "borg backup tool" .SH NAME borg-import-tar \- Create a backup archive from a tarball .SH SYNOPSIS @@ -96,7 +96,7 @@ specify the archive name .B TARFILE input tar file. \(dq\-\(dq to read from stdin instead. .UNINDENT -.SS options +.SS optional arguments .INDENT 0.0 .TP .B \-\-tar\-filter diff --git a/docs/man/borg-info.1 b/docs/man/borg-info.1 index eb368a80f..a9812b154 100644 --- a/docs/man/borg-info.1 +++ b/docs/man/borg-info.1 @@ -27,7 +27,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "BORG-INFO" 1 "2024-02-20" "" "borg backup tool" +.TH "BORG-INFO" 1 "2024-07-19" "" "borg backup tool" .SH NAME borg-info \- Show archive details such as disk space used .SH SYNOPSIS @@ -48,7 +48,7 @@ All archives / deduplicated size = amount of data stored in the repo .SH OPTIONS .sp See \fIborg\-common(1)\fP for common options of Borg commands. -.SS options +.SS optional arguments .INDENT 0.0 .TP .B \-\-json diff --git a/docs/man/borg-key-change-location.1 b/docs/man/borg-key-change-location.1 index d11fb68c2..7ffb2f185 100644 --- a/docs/man/borg-key-change-location.1 +++ b/docs/man/borg-key-change-location.1 @@ -27,7 +27,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "BORG-KEY-CHANGE-LOCATION" 1 "2024-02-20" "" "borg backup tool" +.TH "BORG-KEY-CHANGE-LOCATION" 1 "2024-07-19" "" "borg backup tool" .SH NAME borg-key-change-location \- Change repository key location .SH SYNOPSIS @@ -56,7 +56,7 @@ See \fIborg\-common(1)\fP for common options of Borg commands. .B KEY_LOCATION select key location .UNINDENT -.SS options +.SS optional arguments .INDENT 0.0 .TP .B \-\-keep diff --git a/docs/man/borg-key-change-passphrase.1 b/docs/man/borg-key-change-passphrase.1 index 0219262d0..a1c6c6b2c 100644 --- a/docs/man/borg-key-change-passphrase.1 +++ b/docs/man/borg-key-change-passphrase.1 @@ -27,7 +27,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "BORG-KEY-CHANGE-PASSPHRASE" 1 "2024-02-20" "" "borg backup tool" +.TH "BORG-KEY-CHANGE-PASSPHRASE" 1 "2024-07-19" "" "borg backup tool" .SH NAME borg-key-change-passphrase \- Change repository key file passphrase .SH SYNOPSIS diff --git a/docs/man/borg-key-export.1 b/docs/man/borg-key-export.1 index a7d1470b4..c202b3a87 100644 --- a/docs/man/borg-key-export.1 +++ b/docs/man/borg-key-export.1 @@ -27,7 +27,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "BORG-KEY-EXPORT" 1 "2024-02-20" "" "borg backup tool" +.TH "BORG-KEY-EXPORT" 1 "2024-07-19" "" "borg backup tool" .SH NAME borg-key-export \- Export the repository key for backup .SH SYNOPSIS @@ -56,24 +56,6 @@ For repositories using the repokey encryption the key is saved in the repository in the config file. A backup is thus not strictly needed, but guards against the repository becoming inaccessible if the file is damaged for some reason. -.sp -Examples: -.INDENT 0.0 -.INDENT 3.5 -.sp -.nf -.ft C -borg key export /path/to/repo > encrypted\-key\-backup -borg key export \-\-paper /path/to/repo > encrypted\-key\-backup.txt -borg key export \-\-qr\-html /path/to/repo > encrypted\-key\-backup.html -# Or pass the output file as an argument instead of redirecting stdout: -borg key export /path/to/repo encrypted\-key\-backup -borg key export \-\-paper /path/to/repo encrypted\-key\-backup.txt -borg key export \-\-qr\-html /path/to/repo encrypted\-key\-backup.html -.ft P -.fi -.UNINDENT -.UNINDENT .SH OPTIONS .sp See \fIborg\-common(1)\fP for common options of Borg commands. @@ -83,7 +65,7 @@ See \fIborg\-common(1)\fP for common options of Borg commands. .B PATH where to store the backup .UNINDENT -.SS options +.SS optional arguments .INDENT 0.0 .TP .B \-\-paper @@ -92,6 +74,23 @@ Create an export suitable for printing and later type\-in .B \-\-qr\-html Create an html file suitable for printing and later type\-in or qr scan .UNINDENT +.SH EXAMPLES +.INDENT 0.0 +.INDENT 3.5 +.sp +.nf +.ft C +borg key export > encrypted\-key\-backup +borg key export \-\-paper > encrypted\-key\-backup.txt +borg key export \-\-qr\-html > encrypted\-key\-backup.html +# Or pass the output file as an argument instead of redirecting stdout: +borg key export encrypted\-key\-backup +borg key export \-\-paper encrypted\-key\-backup.txt +borg key export \-\-qr\-html encrypted\-key\-backup.html +.ft P +.fi +.UNINDENT +.UNINDENT .SH SEE ALSO .sp \fIborg\-common(1)\fP, \fIborg\-key\-import(1)\fP diff --git a/docs/man/borg-key-import.1 b/docs/man/borg-key-import.1 index 7e6f2721f..424008678 100644 --- a/docs/man/borg-key-import.1 +++ b/docs/man/borg-key-import.1 @@ -27,7 +27,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "BORG-KEY-IMPORT" 1 "2024-02-20" "" "borg backup tool" +.TH "BORG-KEY-IMPORT" 1 "2024-07-19" "" "borg backup tool" .SH NAME borg-key-import \- Import the repository key from backup .SH SYNOPSIS @@ -58,7 +58,7 @@ See \fIborg\-common(1)\fP for common options of Borg commands. .B PATH path to the backup (\(aq\-\(aq to read from stdin) .UNINDENT -.SS options +.SS optional arguments .INDENT 0.0 .TP .B \-\-paper diff --git a/docs/man/borg-key.1 b/docs/man/borg-key.1 index 4a04a15ee..7ce6eb6e9 100644 --- a/docs/man/borg-key.1 +++ b/docs/man/borg-key.1 @@ -27,7 +27,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "BORG-KEY" 1 "2024-02-20" "" "borg backup tool" +.TH "BORG-KEY" 1 "2024-07-19" "" "borg backup tool" .SH NAME borg-key \- Manage a keyfile or repokey of a repository .SH SYNOPSIS diff --git a/docs/man/borg-list.1 b/docs/man/borg-list.1 index 5486e4edd..9d997585b 100644 --- a/docs/man/borg-list.1 +++ b/docs/man/borg-list.1 @@ -27,7 +27,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "BORG-LIST" 1 "2024-02-20" "" "borg backup tool" +.TH "BORG-LIST" 1 "2024-07-19" "" "borg backup tool" .SH NAME borg-list \- List archive contents .SH SYNOPSIS @@ -50,7 +50,7 @@ specify the archive name .B PATH paths to list; patterns are supported .UNINDENT -.SS options +.SS optional arguments .INDENT 0.0 .TP .B \-\-short diff --git a/docs/man/borg-match-archives.1 b/docs/man/borg-match-archives.1 index 929664b37..6d5b39ef7 100644 --- a/docs/man/borg-match-archives.1 +++ b/docs/man/borg-match-archives.1 @@ -27,7 +27,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "BORG-MATCH-ARCHIVES" 1 "2024-02-20" "" "borg backup tool" +.TH "BORG-MATCH-ARCHIVES" 1 "2024-07-19" "" "borg backup tool" .SH NAME borg-match-archives \- Details regarding match-archives .SH DESCRIPTION diff --git a/docs/man/borg-mount.1 b/docs/man/borg-mount.1 index c3d66eb47..81b7fc218 100644 --- a/docs/man/borg-mount.1 +++ b/docs/man/borg-mount.1 @@ -27,7 +27,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "BORG-MOUNT" 1 "2024-02-20" "" "borg backup tool" +.TH "BORG-MOUNT" 1 "2024-07-19" "" "borg backup tool" .SH NAME borg-mount \- Mount archive or an entire repository as a FUSE filesystem .SH SYNOPSIS @@ -107,7 +107,7 @@ where to mount filesystem .B PATH paths to extract; patterns are supported .UNINDENT -.SS options +.SS optional arguments .INDENT 0.0 .TP .B \-\-consider\-checkpoints diff --git a/docs/man/borg-patterns.1 b/docs/man/borg-patterns.1 index 4c89c5ffe..6850b83ed 100644 --- a/docs/man/borg-patterns.1 +++ b/docs/man/borg-patterns.1 @@ -27,7 +27,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "BORG-PATTERNS" 1 "2024-02-20" "" "borg backup tool" +.TH "BORG-PATTERNS" 1 "2024-07-19" "" "borg backup tool" .SH NAME borg-patterns \- Details regarding patterns .SH DESCRIPTION diff --git a/docs/man/borg-placeholders.1 b/docs/man/borg-placeholders.1 index b46cbe37d..e570eb9cb 100644 --- a/docs/man/borg-placeholders.1 +++ b/docs/man/borg-placeholders.1 @@ -27,7 +27,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "BORG-PLACEHOLDERS" 1 "2024-02-20" "" "borg backup tool" +.TH "BORG-PLACEHOLDERS" 1 "2024-07-19" "" "borg backup tool" .SH NAME borg-placeholders \- Details regarding placeholders .SH DESCRIPTION diff --git a/docs/man/borg-prune.1 b/docs/man/borg-prune.1 index c99ef29ae..066d3ba7f 100644 --- a/docs/man/borg-prune.1 +++ b/docs/man/borg-prune.1 @@ -27,7 +27,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "BORG-PRUNE" 1 "2024-02-20" "" "borg backup tool" +.TH "BORG-PRUNE" 1 "2024-07-19" "" "borg backup tool" .SH NAME borg-prune \- Prune repository archives according to specified rules .SH SYNOPSIS @@ -96,7 +96,7 @@ the \fBborg rlist\fP description for more details about the format string). .SH OPTIONS .sp See \fIborg\-common(1)\fP for common options of Borg commands. -.SS options +.SS optional arguments .INDENT 0.0 .TP .B \-n\fP,\fB \-\-dry\-run diff --git a/docs/man/borg-rcompress.1 b/docs/man/borg-rcompress.1 index 1295cff41..64b9556e8 100644 --- a/docs/man/borg-rcompress.1 +++ b/docs/man/borg-rcompress.1 @@ -27,7 +27,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "BORG-RCOMPRESS" 1 "2024-02-20" "" "borg backup tool" +.TH "BORG-RCOMPRESS" 1 "2024-07-19" "" "borg backup tool" .SH NAME borg-rcompress \- Repository (re-)compression .SH SYNOPSIS @@ -64,7 +64,7 @@ You do \fBnot\fP need to run \fBborg compact\fP after \fBborg rcompress\fP\&. .SH OPTIONS .sp See \fIborg\-common(1)\fP for common options of Borg commands. -.SS options +.SS optional arguments .INDENT 0.0 .TP .BI \-C \ COMPRESSION\fR,\fB \ \-\-compression \ COMPRESSION diff --git a/docs/man/borg-rcreate.1 b/docs/man/borg-rcreate.1 index 7e3d52a6a..d26f08e33 100644 --- a/docs/man/borg-rcreate.1 +++ b/docs/man/borg-rcreate.1 @@ -27,7 +27,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "BORG-RCREATE" 1 "2024-02-20" "" "borg backup tool" +.TH "BORG-RCREATE" 1 "2024-07-19" "" "borg backup tool" .SH NAME borg-rcreate \- Create a new, empty repository .SH SYNOPSIS @@ -229,7 +229,7 @@ Creating related repositories is useful e.g. if you want to use \fBborg transfer .SH OPTIONS .sp See \fIborg\-common(1)\fP for common options of Borg commands. -.SS options +.SS optional arguments .INDENT 0.0 .TP .BI \-\-other\-repo \ SRC_REPOSITORY diff --git a/docs/man/borg-rdelete.1 b/docs/man/borg-rdelete.1 index 7ad376e14..f7447dcb1 100644 --- a/docs/man/borg-rdelete.1 +++ b/docs/man/borg-rdelete.1 @@ -27,7 +27,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "BORG-RDELETE" 1 "2024-02-20" "" "borg backup tool" +.TH "BORG-RDELETE" 1 "2024-07-19" "" "borg backup tool" .SH NAME borg-rdelete \- Delete a repository .SH SYNOPSIS @@ -46,7 +46,7 @@ Always first use \fB\-\-dry\-run \-\-list\fP to see what would be deleted. .SH OPTIONS .sp See \fIborg\-common(1)\fP for common options of Borg commands. -.SS options +.SS optional arguments .INDENT 0.0 .TP .B \-n\fP,\fB \-\-dry\-run diff --git a/docs/man/borg-recreate.1 b/docs/man/borg-recreate.1 index c73bd2870..218032595 100644 --- a/docs/man/borg-recreate.1 +++ b/docs/man/borg-recreate.1 @@ -27,7 +27,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "BORG-RECREATE" 1 "2024-02-20" "" "borg backup tool" +.TH "BORG-RECREATE" 1 "2024-07-19" "" "borg backup tool" .SH NAME borg-recreate \- Re-create archives .SH SYNOPSIS @@ -88,7 +88,7 @@ See \fIborg\-common(1)\fP for common options of Borg commands. .B PATH paths to recreate; patterns are supported .UNINDENT -.SS options +.SS optional arguments .INDENT 0.0 .TP .B \-\-list diff --git a/docs/man/borg-rename.1 b/docs/man/borg-rename.1 index ec66b3734..48c2b1a99 100644 --- a/docs/man/borg-rename.1 +++ b/docs/man/borg-rename.1 @@ -27,7 +27,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "BORG-RENAME" 1 "2024-02-20" "" "borg backup tool" +.TH "BORG-RENAME" 1 "2024-07-19" "" "borg backup tool" .SH NAME borg-rename \- Rename an existing archive .SH SYNOPSIS diff --git a/docs/man/borg-rinfo.1 b/docs/man/borg-rinfo.1 index bba9018ef..3ba96e3b1 100644 --- a/docs/man/borg-rinfo.1 +++ b/docs/man/borg-rinfo.1 @@ -27,7 +27,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "BORG-RINFO" 1 "2024-02-20" "" "borg backup tool" +.TH "BORG-RINFO" 1 "2024-07-19" "" "borg backup tool" .SH NAME borg-rinfo \- Show repository infos .SH SYNOPSIS @@ -48,7 +48,7 @@ All archives / deduplicated size = amount of data stored in the repo .SH OPTIONS .sp See \fIborg\-common(1)\fP for common options of Borg commands. -.SS options +.SS optional arguments .INDENT 0.0 .TP .B \-\-json diff --git a/docs/man/borg-rlist.1 b/docs/man/borg-rlist.1 index d795e6e4d..da38b71ee 100644 --- a/docs/man/borg-rlist.1 +++ b/docs/man/borg-rlist.1 @@ -27,7 +27,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "BORG-RLIST" 1 "2024-02-20" "" "borg backup tool" +.TH "BORG-RLIST" 1 "2024-07-19" "" "borg backup tool" .SH NAME borg-rlist \- List the archives contained in a repository .SH SYNOPSIS @@ -39,7 +39,7 @@ This command lists the archives contained in a repository. .SH OPTIONS .sp See \fIborg\-common(1)\fP for common options of Borg commands. -.SS options +.SS optional arguments .INDENT 0.0 .TP .B \-\-consider\-checkpoints diff --git a/docs/man/borg-serve.1 b/docs/man/borg-serve.1 index 595ddf3df..b5ab1dbeb 100644 --- a/docs/man/borg-serve.1 +++ b/docs/man/borg-serve.1 @@ -27,7 +27,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "BORG-SERVE" 1 "2024-02-20" "" "borg backup tool" +.TH "BORG-SERVE" 1 "2024-07-19" "" "borg backup tool" .SH NAME borg-serve \- Start in server mode. This command is usually not used manually. .SH SYNOPSIS @@ -51,7 +51,7 @@ option if you do not want to use the default path for the socket and pid file). .SH OPTIONS .sp See \fIborg\-common(1)\fP for common options of Borg commands. -.SS options +.SS optional arguments .INDENT 0.0 .TP .BI \-\-restrict\-to\-path \ PATH diff --git a/docs/man/borg-transfer.1 b/docs/man/borg-transfer.1 index d535f481e..f6cd45450 100644 --- a/docs/man/borg-transfer.1 +++ b/docs/man/borg-transfer.1 @@ -27,7 +27,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "BORG-TRANSFER" 1 "2024-02-20" "" "borg backup tool" +.TH "BORG-TRANSFER" 1 "2024-07-19" "" "borg backup tool" .SH NAME borg-transfer \- archives transfer from other repository, optionally upgrade data format .SH SYNOPSIS @@ -92,7 +92,7 @@ borg \-\-repo=DST_REPO transfer \-\-other\-repo=SRC_REPO \-\-upgrader=From12To20 .SH OPTIONS .sp See \fIborg\-common(1)\fP for common options of Borg commands. -.SS options +.SS optional arguments .INDENT 0.0 .TP .B \-n\fP,\fB \-\-dry\-run diff --git a/docs/man/borg-umount.1 b/docs/man/borg-umount.1 index 56b22e9f3..46e4058a3 100644 --- a/docs/man/borg-umount.1 +++ b/docs/man/borg-umount.1 @@ -27,7 +27,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "BORG-UMOUNT" 1 "2024-02-20" "" "borg backup tool" +.TH "BORG-UMOUNT" 1 "2024-07-19" "" "borg backup tool" .SH NAME borg-umount \- un-mount the FUSE filesystem .SH SYNOPSIS diff --git a/docs/man/borg-version.1 b/docs/man/borg-version.1 index 6b77b7b5a..1635c4110 100644 --- a/docs/man/borg-version.1 +++ b/docs/man/borg-version.1 @@ -27,7 +27,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "BORG-VERSION" 1 "2024-02-20" "" "borg backup tool" +.TH "BORG-VERSION" 1 "2024-07-19" "" "borg backup tool" .SH NAME borg-version \- Display the borg client / borg server version .SH SYNOPSIS diff --git a/docs/man/borg-with-lock.1 b/docs/man/borg-with-lock.1 index 91a54b150..db07e8ec9 100644 --- a/docs/man/borg-with-lock.1 +++ b/docs/man/borg-with-lock.1 @@ -27,7 +27,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "BORG-WITH-LOCK" 1 "2024-02-20" "" "borg backup tool" +.TH "BORG-WITH-LOCK" 1 "2024-07-19" "" "borg backup tool" .SH NAME borg-with-lock \- run a user specified command with the repository lock held .SH SYNOPSIS diff --git a/docs/man/borg.1 b/docs/man/borg.1 index 1a9e9b997..d2944b145 100644 --- a/docs/man/borg.1 +++ b/docs/man/borg.1 @@ -27,7 +27,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "BORG" 1 "2024-02-20" "" "borg backup tool" +.TH "BORG" 1 "2024-07-19" "" "borg backup tool" .SH NAME borg \- deduplicating and encrypting backup tool .SH SYNOPSIS @@ -423,7 +423,8 @@ When set, use the value to answer the \(dqdisplay the passphrase for verificatio .TP .B BORG_EXIT_CODES When set to \(dqmodern\(dq, the borg process will return more specific exit codes (rc). -Default is \(dqlegacy\(dq and returns rc 2 for all errors, 1 for all warnings, 0 for success. +When set to \(dqlegacy\(dq, the borg process will return rc 2 for all errors, 1 for all warnings, 0 for success. +Default is \(dqmodern\(dq. .TP .B BORG_HOST_ID Borg usually computes a host id from the FQDN plus the results of \fBuuid.getnode()\fP (which usually returns @@ -460,6 +461,10 @@ When set to a numeric value, this determines the maximum \(dqtime to live\(dq fo entries (default: 20). The files cache is used to determine quickly whether a file is unchanged. The FAQ explains this more detailed in: \fIalways_chunking\fP .TP +.B BORG_USE_CHUNKS_ARCHIVE +When set to no (default: yes), the \fBchunks.archive.d\fP folder will not be used. This reduces +disk space usage but slows down cache resyncs. +.TP .B BORG_SHOW_SYSINFO When set to no (default: yes), system information (like OS, Python version, ...) in exceptions is not shown. @@ -482,6 +487,24 @@ given order, e.g.: \fBnone\fP: do not try to load an implementation .UNINDENT .TP +.B BORG_CACHE_IMPL +Choose the implementation for the clientside cache, choose one of: +.INDENT 7.0 +.IP \(bu 2 +\fBlocal\fP: uses a persistent chunks cache and keeps it in a perfect state (precise refcounts and +sizes), requiring a potentially resource expensive cache sync in multi\-client scenarios. +Also has a persistent files cache. +.IP \(bu 2 +\fBadhoc\fP: builds a non\-persistent chunks cache by querying the repo. Chunks cache contents +are somewhat sloppy for already existing chunks, concerning their refcount (\(dqinfinite\(dq) and +size (0). No files cache (slow, will chunk all input files). DEPRECATED. +.IP \(bu 2 +\fBadhocwithfiles\fP: Like \fBadhoc\fP, but with a persistent files cache. Default implementation. +.IP \(bu 2 +\fBcli\fP: Determine the cache implementation from cli options. Without special options, will +usually end up with the \fBlocal\fP implementation. +.UNINDENT +.TP .B BORG_SELFTEST This can be used to influence borg\(aqs builtin self\-tests. The default is to execute the tests at the beginning of each borg command invocation. diff --git a/docs/man/borgfs.1 b/docs/man/borgfs.1 index 511728b45..7c37e09f1 100644 --- a/docs/man/borgfs.1 +++ b/docs/man/borgfs.1 @@ -27,7 +27,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "BORGFS" 1 "2024-02-20" "" "borg backup tool" +.TH "BORGFS" 1 "2024-07-19" "" "borg backup tool" .SH NAME borgfs \- Mount archive or an entire repository as a FUSE filesystem .SH SYNOPSIS @@ -48,7 +48,7 @@ where to mount filesystem .B PATH paths to extract; patterns are supported .UNINDENT -.SS options +.SS optional arguments .INDENT 0.0 .TP .B \-V\fP,\fB \-\-version diff --git a/docs/usage/check.rst.inc b/docs/usage/check.rst.inc index 4a1e51e2e..e0764302b 100644 --- a/docs/usage/check.rst.inc +++ b/docs/usage/check.rst.inc @@ -13,7 +13,7 @@ borg check .. class:: borg-options-table +-----------------------------------------------------------------------------+----------------------------------------------+-----------------------------------------------------------------------------------------------------------+ - | **options** | + | **optional arguments** | +-----------------------------------------------------------------------------+----------------------------------------------+-----------------------------------------------------------------------------------------------------------+ | | ``--repository-only`` | only perform repository checks | +-----------------------------------------------------------------------------+----------------------------------------------+-----------------------------------------------------------------------------------------------------------+ @@ -60,7 +60,7 @@ borg check - options + optional arguments --repository-only only perform repository checks --archives-only only perform archives checks --verify-data perform cryptographic archive data integrity verification (conflicts with ``--repository-only``) diff --git a/docs/usage/compact.rst.inc b/docs/usage/compact.rst.inc index 3bac1db8d..946b376fc 100644 --- a/docs/usage/compact.rst.inc +++ b/docs/usage/compact.rst.inc @@ -13,7 +13,7 @@ borg compact .. class:: borg-options-table +-------------------------------------------------------+-------------------------+----------------------------------------------------------------+ - | **options** | + | **optional arguments** | +-------------------------------------------------------+-------------------------+----------------------------------------------------------------+ | | ``--threshold PERCENT`` | set minimum threshold for saved space in PERCENT (Default: 10) | +-------------------------------------------------------+-------------------------+----------------------------------------------------------------+ @@ -34,7 +34,7 @@ borg compact - options + optional arguments --threshold PERCENT set minimum threshold for saved space in PERCENT (Default: 10) diff --git a/docs/usage/config.rst.inc b/docs/usage/config.rst.inc index 521a91d3a..6236ba5b3 100644 --- a/docs/usage/config.rst.inc +++ b/docs/usage/config.rst.inc @@ -19,7 +19,7 @@ borg config +-------------------------------------------------------+----------------------+----------------------------------------+ | | ``VALUE`` | new value for key | +-------------------------------------------------------+----------------------+----------------------------------------+ - | **options** | + | **optional arguments** | +-------------------------------------------------------+----------------------+----------------------------------------+ | | ``-c``, ``--cache`` | get and set values from the repo cache | +-------------------------------------------------------+----------------------+----------------------------------------+ @@ -48,7 +48,7 @@ borg config new value for key - options + optional arguments -c, --cache get and set values from the repo cache -d, --delete delete the key from the config file -l, --list list the configuration of the repo @@ -64,7 +64,7 @@ This command gets and sets options in a local repository or cache config file. For security reasons, this command only works on local repositories. To delete a config value entirely, use ``--delete``. To list the values -of the configuration file or the default values, use ``--list``. To get and existing +of the configuration file or the default values, use ``--list``. To get an existing key, pass only the key name. To set a key, pass both the key name and the new value. Keys can be specified in the format "section.name" or simply "name"; the section will default to "repository" and "cache" for diff --git a/docs/usage/create.rst.inc b/docs/usage/create.rst.inc index 12c71e332..bf6129692 100644 --- a/docs/usage/create.rst.inc +++ b/docs/usage/create.rst.inc @@ -19,7 +19,7 @@ borg create +-------------------------------------------------------+---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | | ``PATH`` | paths to archive | +-------------------------------------------------------+---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | **options** | + | **optional arguments** | +-------------------------------------------------------+---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | | ``-n``, ``--dry-run`` | do not create a backup archive | +-------------------------------------------------------+---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -31,7 +31,11 @@ borg create +-------------------------------------------------------+---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | | ``--json`` | output stats as JSON. Implies ``--stats``. | +-------------------------------------------------------+---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | | ``--no-cache-sync`` | experimental: do not synchronize the cache. Implies not using the files cache. | + | | ``--no-cache-sync`` | experimental: do not synchronize the chunks cache. | + +-------------------------------------------------------+---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | | ``--no-cache-sync-forced`` | experimental: do not synchronize the chunks cache (forced). | + +-------------------------------------------------------+---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | | ``--prefer-adhoc-cache`` | experimental: prefer AdHocCache (w/o files cache) over AdHocWithFilesCache (with files cache). | +-------------------------------------------------------+---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | | ``--stdin-name NAME`` | use NAME in archive for stdin data (default: 'stdin') | +-------------------------------------------------------+---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -126,13 +130,15 @@ borg create paths to archive - options + optional arguments -n, --dry-run do not create a backup archive -s, --stats print statistics for the created archive --list output verbose list of items (files, dirs, ...) --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. + --no-cache-sync experimental: do not synchronize the chunks cache. + --no-cache-sync-forced experimental: do not synchronize the chunks cache (forced). + --prefer-adhoc-cache experimental: prefer AdHocCache (w/o files cache) over AdHocWithFilesCache (with files cache). --stdin-name NAME use NAME in archive for stdin data (default: 'stdin') --stdin-user USER set user USER in archive for stdin data (default: do not store user/uid) --stdin-group GROUP set group GROUP in archive for stdin data (default: do not store group/gid) diff --git a/docs/usage/delete.rst.inc b/docs/usage/delete.rst.inc index dd53f7d00..c5740ca67 100644 --- a/docs/usage/delete.rst.inc +++ b/docs/usage/delete.rst.inc @@ -13,7 +13,7 @@ borg delete .. class:: borg-options-table +-----------------------------------------------------------------------------+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------+ - | **options** | + | **optional arguments** | +-----------------------------------------------------------------------------+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------+ | | ``-n``, ``--dry-run`` | do not change repository | +-----------------------------------------------------------------------------+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------+ @@ -62,7 +62,7 @@ borg delete - options + optional arguments -n, --dry-run do not change repository --list output verbose list of archives --consider-checkpoints consider checkpoint archives for deletion (default: not considered). diff --git a/docs/usage/diff.rst.inc b/docs/usage/diff.rst.inc index b7f166b96..254881182 100644 --- a/docs/usage/diff.rst.inc +++ b/docs/usage/diff.rst.inc @@ -21,7 +21,7 @@ borg diff +-------------------------------------------------------+---------------------------------------+----------------------------------------------------------------------------------+ | | ``PATH`` | paths of items inside the archives to compare; patterns are supported | +-------------------------------------------------------+---------------------------------------+----------------------------------------------------------------------------------+ - | **options** | + | **optional arguments** | +-------------------------------------------------------+---------------------------------------+----------------------------------------------------------------------------------+ | | ``--numeric-ids`` | only consider numeric user and group identifiers | +-------------------------------------------------------+---------------------------------------+----------------------------------------------------------------------------------+ @@ -68,7 +68,7 @@ borg diff paths of items inside the archives to compare; patterns are supported - options + optional arguments --numeric-ids only consider numeric user and group identifiers --same-chunker-params Override check of chunker parameters. --sort Sort the output lines by file path. diff --git a/docs/usage/export-tar.rst.inc b/docs/usage/export-tar.rst.inc index 848d9d9c0..a1918ed91 100644 --- a/docs/usage/export-tar.rst.inc +++ b/docs/usage/export-tar.rst.inc @@ -21,7 +21,7 @@ borg export-tar +-------------------------------------------------------+---------------------------------------+-----------------------------------------------------------------------------------------------------------+ | | ``PATH`` | paths to extract; patterns are supported | +-------------------------------------------------------+---------------------------------------+-----------------------------------------------------------------------------------------------------------+ - | **options** | + | **optional arguments** | +-------------------------------------------------------+---------------------------------------+-----------------------------------------------------------------------------------------------------------+ | | ``--tar-filter`` | filter program to pipe data through | +-------------------------------------------------------+---------------------------------------+-----------------------------------------------------------------------------------------------------------+ @@ -64,7 +64,7 @@ borg export-tar paths to extract; patterns are supported - options + optional arguments --tar-filter filter program to pipe data through --list output verbose list of items (files, dirs, ...) --tar-format FMT select tar format: BORG, PAX or GNU diff --git a/docs/usage/extract.rst.inc b/docs/usage/extract.rst.inc index b99dd03dd..46c321ec1 100644 --- a/docs/usage/extract.rst.inc +++ b/docs/usage/extract.rst.inc @@ -19,7 +19,7 @@ borg extract +-------------------------------------------------------+---------------------------------------+-----------------------------------------------------------------------------------------------------------+ | | ``PATH`` | paths to extract; patterns are supported | +-------------------------------------------------------+---------------------------------------+-----------------------------------------------------------------------------------------------------------+ - | **options** | + | **optional arguments** | +-------------------------------------------------------+---------------------------------------+-----------------------------------------------------------------------------------------------------------+ | | ``--list`` | output verbose list of items (files, dirs, ...) | +-------------------------------------------------------+---------------------------------------+-----------------------------------------------------------------------------------------------------------+ @@ -72,7 +72,7 @@ borg extract paths to extract; patterns are supported - options + optional arguments --list output verbose list of items (files, dirs, ...) -n, --dry-run do not actually change any files --numeric-ids only obey numeric user and group identifiers diff --git a/docs/usage/import-tar.rst.inc b/docs/usage/import-tar.rst.inc index 24ce2fb0c..fcf0eaa5f 100644 --- a/docs/usage/import-tar.rst.inc +++ b/docs/usage/import-tar.rst.inc @@ -19,7 +19,7 @@ borg import-tar +-------------------------------------------------------+---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | | ``TARFILE`` | input tar file. "-" to read from stdin instead. | +-------------------------------------------------------+---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | **options** | + | **optional arguments** | +-------------------------------------------------------+---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | | ``--tar-filter`` | filter program to pipe data through | +-------------------------------------------------------+---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -68,7 +68,7 @@ borg import-tar input tar file. "-" to read from stdin instead. - options + optional arguments --tar-filter filter program to pipe data through -s, --stats print statistics for the created archive --list output verbose list of items (files, dirs, ...) diff --git a/docs/usage/info.rst.inc b/docs/usage/info.rst.inc index fdc9ec01b..341028335 100644 --- a/docs/usage/info.rst.inc +++ b/docs/usage/info.rst.inc @@ -13,7 +13,7 @@ borg info .. class:: borg-options-table +-----------------------------------------------------------------------------+----------------------------------------------+-----------------------------------------------------------------------------------------------------------+ - | **options** | + | **optional arguments** | +-----------------------------------------------------------------------------+----------------------------------------------+-----------------------------------------------------------------------------------------------------------+ | | ``--json`` | format output as JSON | +-----------------------------------------------------------------------------+----------------------------------------------+-----------------------------------------------------------------------------------------------------------+ @@ -52,7 +52,7 @@ borg info - options + optional arguments --json format output as JSON diff --git a/docs/usage/key_change-location.rst.inc b/docs/usage/key_change-location.rst.inc index 956c5cb22..4480e7d2c 100644 --- a/docs/usage/key_change-location.rst.inc +++ b/docs/usage/key_change-location.rst.inc @@ -17,7 +17,7 @@ borg key change-location +-------------------------------------------------------+------------------+----------------------------------------------------------------+ | | ``KEY_LOCATION`` | select key location | +-------------------------------------------------------+------------------+----------------------------------------------------------------+ - | **options** | + | **optional arguments** | +-------------------------------------------------------+------------------+----------------------------------------------------------------+ | | ``--keep`` | keep the key also at the current location (default: remove it) | +-------------------------------------------------------+------------------+----------------------------------------------------------------+ @@ -40,7 +40,7 @@ borg key change-location select key location - options + optional arguments --keep keep the key also at the current location (default: remove it) diff --git a/docs/usage/key_export.rst.inc b/docs/usage/key_export.rst.inc index 35975e9a0..eb0646905 100644 --- a/docs/usage/key_export.rst.inc +++ b/docs/usage/key_export.rst.inc @@ -17,7 +17,7 @@ borg key export +-------------------------------------------------------+---------------+------------------------------------------------------------------------+ | | ``PATH`` | where to store the backup | +-------------------------------------------------------+---------------+------------------------------------------------------------------------+ - | **options** | + | **optional arguments** | +-------------------------------------------------------+---------------+------------------------------------------------------------------------+ | | ``--paper`` | Create an export suitable for printing and later type-in | +-------------------------------------------------------+---------------+------------------------------------------------------------------------+ @@ -42,7 +42,7 @@ borg key export where to store the backup - options + optional arguments --paper Create an export suitable for printing and later type-in --qr-html Create an html file suitable for printing and later type-in or qr scan @@ -73,15 +73,4 @@ data backup. For repositories using the repokey encryption the key is saved in the repository in the config file. A backup is thus not strictly needed, but guards against the repository becoming inaccessible if the file -is damaged for some reason. - -Examples:: - - borg key export /path/to/repo > encrypted-key-backup - borg key export --paper /path/to/repo > encrypted-key-backup.txt - borg key export --qr-html /path/to/repo > encrypted-key-backup.html - # Or pass the output file as an argument instead of redirecting stdout: - borg key export /path/to/repo encrypted-key-backup - borg key export --paper /path/to/repo encrypted-key-backup.txt - borg key export --qr-html /path/to/repo encrypted-key-backup.html - +is damaged for some reason. \ No newline at end of file diff --git a/docs/usage/key_import.rst.inc b/docs/usage/key_import.rst.inc index cd778b1a1..54492033e 100644 --- a/docs/usage/key_import.rst.inc +++ b/docs/usage/key_import.rst.inc @@ -17,7 +17,7 @@ borg key import +-------------------------------------------------------+-------------+----------------------------------------------------------+ | | ``PATH`` | path to the backup ('-' to read from stdin) | +-------------------------------------------------------+-------------+----------------------------------------------------------+ - | **options** | + | **optional arguments** | +-------------------------------------------------------+-------------+----------------------------------------------------------+ | | ``--paper`` | interactively import from a backup done with ``--paper`` | +-------------------------------------------------------+-------------+----------------------------------------------------------+ @@ -40,7 +40,7 @@ borg key import path to the backup ('-' to read from stdin) - options + optional arguments --paper interactively import from a backup done with ``--paper`` diff --git a/docs/usage/list.rst.inc b/docs/usage/list.rst.inc index ab50a2e06..bd99efcc0 100644 --- a/docs/usage/list.rst.inc +++ b/docs/usage/list.rst.inc @@ -19,7 +19,7 @@ borg list +-------------------------------------------------------+---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | | ``PATH`` | paths to list; patterns are supported | +-------------------------------------------------------+---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | **options** | + | **optional arguments** | +-------------------------------------------------------+---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | | ``--short`` | only print file/directory names, nothing else | +-------------------------------------------------------+---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -58,7 +58,7 @@ borg list paths to list; patterns are supported - options + optional arguments --short only print file/directory names, nothing else --format FORMAT specify format for file listing (default: "{mode} {user:6} {group:6} {size:8} {mtime} {path}{extra}{NL}") --json-lines Format output as JSON Lines. The form of ``--format`` is ignored, but keys used in it are added to the JSON output. Some keys are always present. Note: JSON can only represent text. diff --git a/docs/usage/mount.rst.inc b/docs/usage/mount.rst.inc index facedb8da..777a86b1b 100644 --- a/docs/usage/mount.rst.inc +++ b/docs/usage/mount.rst.inc @@ -19,7 +19,7 @@ borg mount +-----------------------------------------------------------------------------+----------------------------------------------+-----------------------------------------------------------------------------------------------------------+ | | ``PATH`` | paths to extract; patterns are supported | +-----------------------------------------------------------------------------+----------------------------------------------+-----------------------------------------------------------------------------------------------------------+ - | **options** | + | **optional arguments** | +-----------------------------------------------------------------------------+----------------------------------------------+-----------------------------------------------------------------------------------------------------------+ | | ``--consider-checkpoints`` | Show checkpoint archives in the repository contents list (default: hidden). | +-----------------------------------------------------------------------------+----------------------------------------------+-----------------------------------------------------------------------------------------------------------+ @@ -80,7 +80,7 @@ borg mount paths to extract; patterns are supported - options + optional arguments --consider-checkpoints Show checkpoint archives in the repository contents list (default: hidden). -f, --foreground stay in foreground, do not daemonize -o Extra mount options diff --git a/docs/usage/prune.rst.inc b/docs/usage/prune.rst.inc index b1d323eaa..0504f15d3 100644 --- a/docs/usage/prune.rst.inc +++ b/docs/usage/prune.rst.inc @@ -13,7 +13,7 @@ borg prune .. class:: borg-options-table +-----------------------------------------------------------------------------+---------------------------------------------------+---------------------------------------------------------------------------------------------------+ - | **options** | + | **optional arguments** | +-----------------------------------------------------------------------------+---------------------------------------------------+---------------------------------------------------------------------------------------------------+ | | ``-n``, ``--dry-run`` | do not change repository | +-----------------------------------------------------------------------------+---------------------------------------------------+---------------------------------------------------------------------------------------------------+ @@ -78,7 +78,7 @@ borg prune - options + optional arguments -n, --dry-run do not change repository --force force pruning of corrupted archives, use ``--force --force`` in case ``--force`` does not work. -s, --stats print statistics for the deleted archive diff --git a/docs/usage/rcompress.rst.inc b/docs/usage/rcompress.rst.inc index ed048583a..97d19c247 100644 --- a/docs/usage/rcompress.rst.inc +++ b/docs/usage/rcompress.rst.inc @@ -13,7 +13,7 @@ borg rcompress .. class:: borg-options-table +-------------------------------------------------------+---------------------------------------------------+--------------------------------------------------------------------------------------------------+ - | **options** | + | **optional arguments** | +-------------------------------------------------------+---------------------------------------------------+--------------------------------------------------------------------------------------------------+ | | ``-C COMPRESSION``, ``--compression COMPRESSION`` | select compression algorithm, see the output of the "borg help compression" command for details. | +-------------------------------------------------------+---------------------------------------------------+--------------------------------------------------------------------------------------------------+ @@ -38,7 +38,7 @@ borg rcompress - options + optional arguments -C COMPRESSION, --compression COMPRESSION select compression algorithm, see the output of the "borg help compression" command for details. -s, --stats print statistics -c SECONDS, --checkpoint-interval SECONDS write checkpoint every SECONDS seconds (Default: 1800) diff --git a/docs/usage/rcreate.rst.inc b/docs/usage/rcreate.rst.inc index 8cdf8e31d..9082fb562 100644 --- a/docs/usage/rcreate.rst.inc +++ b/docs/usage/rcreate.rst.inc @@ -13,7 +13,7 @@ borg rcreate .. class:: borg-options-table +-------------------------------------------------------+------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | **options** | + | **optional arguments** | +-------------------------------------------------------+------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | | ``--other-repo SRC_REPOSITORY`` | reuse the key material from the other repository | +-------------------------------------------------------+------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -44,7 +44,7 @@ borg rcreate - options + optional arguments --other-repo SRC_REPOSITORY reuse the key material from the other repository -e MODE, --encryption MODE select encryption key mode **(required)** --append-only create an append-only mode repository. Note that this only affects the low level structure of the repository, and running `delete` or `prune` will still be allowed. See :ref:`append_only_mode` in Additional Notes for more details. diff --git a/docs/usage/rdelete.rst.inc b/docs/usage/rdelete.rst.inc index a0bb0ab25..18d9bbc01 100644 --- a/docs/usage/rdelete.rst.inc +++ b/docs/usage/rdelete.rst.inc @@ -13,7 +13,7 @@ borg rdelete .. class:: borg-options-table +-------------------------------------------------------+--------------------------+--------------------------------------------------------------------------------------------------+ - | **options** | + | **optional arguments** | +-------------------------------------------------------+--------------------------+--------------------------------------------------------------------------------------------------+ | | ``-n``, ``--dry-run`` | do not change repository | +-------------------------------------------------------+--------------------------+--------------------------------------------------------------------------------------------------+ @@ -42,7 +42,7 @@ borg rdelete - options + optional arguments -n, --dry-run do not change repository --list output verbose list of archives --force force deletion of corrupted archives, use ``--force --force`` in case ``--force`` does not work. diff --git a/docs/usage/recreate.rst.inc b/docs/usage/recreate.rst.inc index 008baa44f..16ee53b21 100644 --- a/docs/usage/recreate.rst.inc +++ b/docs/usage/recreate.rst.inc @@ -17,7 +17,7 @@ borg recreate +-----------------------------------------------------------------------------+---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | | ``PATH`` | paths to recreate; patterns are supported | +-----------------------------------------------------------------------------+---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | **options** | + | **optional arguments** | +-----------------------------------------------------------------------------+---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | | ``--list`` | output verbose list of items (files, dirs, ...) | +-----------------------------------------------------------------------------+---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -94,7 +94,7 @@ borg recreate paths to recreate; patterns are supported - options + 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 diff --git a/docs/usage/rinfo.rst.inc b/docs/usage/rinfo.rst.inc index 3e125a94c..fa57cdebd 100644 --- a/docs/usage/rinfo.rst.inc +++ b/docs/usage/rinfo.rst.inc @@ -13,7 +13,7 @@ borg rinfo .. class:: borg-options-table +-------------------------------------------------------+------------+-----------------------+ - | **options** | + | **optional arguments** | +-------------------------------------------------------+------------+-----------------------+ | | ``--json`` | format output as JSON | +-------------------------------------------------------+------------+-----------------------+ @@ -34,7 +34,7 @@ borg rinfo - options + optional arguments --json format output as JSON diff --git a/docs/usage/rlist.rst.inc b/docs/usage/rlist.rst.inc index 76afb1e33..2c3b5fcb8 100644 --- a/docs/usage/rlist.rst.inc +++ b/docs/usage/rlist.rst.inc @@ -13,7 +13,7 @@ borg rlist .. class:: borg-options-table +-----------------------------------------------------------------------------+----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | **options** | + | **optional arguments** | +-----------------------------------------------------------------------------+----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | | ``--consider-checkpoints`` | Show checkpoint archives in the repository contents list (default: hidden). | +-----------------------------------------------------------------------------+----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -58,7 +58,7 @@ borg rlist - options + optional arguments --consider-checkpoints Show checkpoint archives in the repository contents list (default: hidden). --short only print the archive names, nothing else --format FORMAT specify format for archive listing (default: "{archive:<36} {time} [{id}]{NL}") diff --git a/docs/usage/serve.rst.inc b/docs/usage/serve.rst.inc index 87fd13f05..e34dbf0be 100644 --- a/docs/usage/serve.rst.inc +++ b/docs/usage/serve.rst.inc @@ -13,7 +13,7 @@ borg serve .. class:: borg-options-table +-------------------------------------------------------+-----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | **options** | + | **optional arguments** | +-------------------------------------------------------+-----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | | ``--restrict-to-path PATH`` | restrict repository access to PATH. Can be specified multiple times to allow the client access to several directories. Access to all sub-directories is granted implicitly; PATH doesn't need to point directly to a repository. | +-------------------------------------------------------+-----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -40,7 +40,7 @@ borg serve - options + optional arguments --restrict-to-path PATH restrict repository access to PATH. Can be specified multiple times to allow the client access to several directories. Access to all sub-directories is granted implicitly; PATH doesn't need to point directly to a repository. --restrict-to-repository PATH restrict repository access. Only the repository located at PATH (no sub-directories are considered) is accessible. Can be specified multiple times to allow the client access to several repositories. Unlike ``--restrict-to-path`` sub-directories are not accessible; PATH needs to point directly at a repository location. PATH may be an empty directory or the last element of PATH may not exist, in which case the client may initialize a repository there. --append-only only allow appending to repository segment files. Note that this only affects the low level structure of the repository, and running `delete` or `prune` will still be allowed. See :ref:`append_only_mode` in Additional Notes for more details. diff --git a/docs/usage/transfer.rst.inc b/docs/usage/transfer.rst.inc index 3083d23c2..f1c3d570a 100644 --- a/docs/usage/transfer.rst.inc +++ b/docs/usage/transfer.rst.inc @@ -13,7 +13,7 @@ borg transfer .. class:: borg-options-table +-----------------------------------------------------------------------------+---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | **options** | + | **optional arguments** | +-----------------------------------------------------------------------------+---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | | ``-n``, ``--dry-run`` | do not change repository, just check | +-----------------------------------------------------------------------------+---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -60,7 +60,7 @@ borg transfer - options + optional arguments -n, --dry-run do not change repository, just check --other-repo SRC_REPOSITORY transfer archives from the other repository --upgrader UPGRADER use the upgrader to convert transferred data (default: no conversion) diff --git a/scripts/upload-pypi b/scripts/upload-pypi index afd6acdcc..44aea4024 100755 --- a/scripts/upload-pypi +++ b/scripts/upload-pypi @@ -8,11 +8,11 @@ if [ "$R" = "" ]; then fi if [ "$2" = "test" ]; then - export TWINE_REPOSITORY=testpypi + export TWINE_REPOSITORY=borgbackuptest else - export TWINE_REPOSITORY=pypi + export TWINE_REPOSITORY=borgbackup fi D=dist/borgbackup-$R.tar.gz -twine upload "$D" +twine upload $D diff --git a/src/borg/testsuite/archiver/config_cmd.py b/src/borg/testsuite/archiver/config_cmd.py index f76234bea..fa89df241 100644 --- a/src/borg/testsuite/archiver/config_cmd.py +++ b/src/borg/testsuite/archiver/config_cmd.py @@ -52,7 +52,8 @@ def test_config(archivers, request): cmd(archiver, "config", "--list", "--delete", exit_code=2) if archiver.FORK_DEFAULT: - cmd(archiver, "config", exit_code=2) + expected_ec = CommandError().exit_code + cmd(archiver, "config", exit_code=expected_ec) else: with pytest.raises(CommandError): cmd(archiver, "config") diff --git a/src/borg/testsuite/archiver/create_cmd.py b/src/borg/testsuite/archiver/create_cmd.py index 4bea39f90..72e8bc97d 100644 --- a/src/borg/testsuite/archiver/create_cmd.py +++ b/src/borg/testsuite/archiver/create_cmd.py @@ -366,7 +366,10 @@ def test_create_content_from_command_with_failed_command(archivers, request): archiver = request.getfixturevalue(archivers) cmd(archiver, "rcreate", RK_ENCRYPTION) if archiver.FORK_DEFAULT: - output = cmd(archiver, "create", "--content-from-command", "test", "--", "sh", "-c", "exit 73;", exit_code=2) + expected_ec = CommandError().exit_code + output = cmd( + archiver, "create", "--content-from-command", "test", "--", "sh", "-c", "exit 73;", exit_code=expected_ec + ) assert output.endswith("Command 'sh' exited with status 73" + os.linesep) else: with pytest.raises(CommandError): @@ -418,7 +421,10 @@ def test_create_paths_from_command_with_failed_command(archivers, request): archiver = request.getfixturevalue(archivers) cmd(archiver, "rcreate", RK_ENCRYPTION) if archiver.FORK_DEFAULT: - output = cmd(archiver, "create", "--paths-from-command", "test", "--", "sh", "-c", "exit 73;", exit_code=2) + expected_ec = CommandError().exit_code + output = cmd( + archiver, "create", "--paths-from-command", "test", "--", "sh", "-c", "exit 73;", exit_code=expected_ec + ) assert output.endswith("Command 'sh' exited with status 73" + os.linesep) else: with pytest.raises(CommandError): diff --git a/src/borg/testsuite/archiver/key_cmds.py b/src/borg/testsuite/archiver/key_cmds.py index 1935bde69..ef00e007e 100644 --- a/src/borg/testsuite/archiver/key_cmds.py +++ b/src/borg/testsuite/archiver/key_cmds.py @@ -6,7 +6,7 @@ import pytest from ...constants import * # NOQA from ...crypto.key import AESOCBRepoKey, AESOCBKeyfileKey, CHPOKeyfileKey, Passphrase from ...crypto.keymanager import RepoIdMismatch, NotABorgKeyFile -from ...helpers import EXIT_ERROR, CommandError +from ...helpers import CommandError from ...helpers import bin_to_hex, hex_to_bin from ...helpers import msgpack from ...repository import Repository @@ -171,7 +171,8 @@ def test_key_export_directory(archivers, request): os.mkdir(export_directory) cmd(archiver, "rcreate", RK_ENCRYPTION) if archiver.FORK_DEFAULT: - cmd(archiver, "key", "export", export_directory, exit_code=EXIT_ERROR) + expected_ec = CommandError().exit_code + cmd(archiver, "key", "export", export_directory, exit_code=expected_ec) else: with pytest.raises(CommandError): cmd(archiver, "key", "export", export_directory) @@ -183,7 +184,8 @@ def test_key_export_qr_directory(archivers, request): os.mkdir(export_directory) cmd(archiver, "rcreate", RK_ENCRYPTION) if archiver.FORK_DEFAULT: - cmd(archiver, "key", "export", "--qr-html", export_directory, exit_code=EXIT_ERROR) + expected_ec = CommandError().exit_code + cmd(archiver, "key", "export", "--qr-html", export_directory, exit_code=expected_ec) else: with pytest.raises(CommandError): cmd(archiver, "key", "export", "--qr-html", export_directory) @@ -194,7 +196,8 @@ def test_key_import_errors(archivers, request): export_file = archiver.output_path + "/exported" cmd(archiver, "rcreate", KF_ENCRYPTION) if archiver.FORK_DEFAULT: - cmd(archiver, "key", "import", export_file, exit_code=EXIT_ERROR) + expected_ec = CommandError().exit_code + cmd(archiver, "key", "import", export_file, exit_code=expected_ec) else: with pytest.raises(CommandError): cmd(archiver, "key", "import", export_file) @@ -203,7 +206,8 @@ def test_key_import_errors(archivers, request): fd.write("something not a key\n") if archiver.FORK_DEFAULT: - cmd(archiver, "key", "import", export_file, exit_code=2) + expected_ec = NotABorgKeyFile().exit_code + cmd(archiver, "key", "import", export_file, exit_code=expected_ec) else: with pytest.raises(NotABorgKeyFile): cmd(archiver, "key", "import", export_file) @@ -212,7 +216,8 @@ def test_key_import_errors(archivers, request): fd.write("BORG_KEY a0a0a0\n") if archiver.FORK_DEFAULT: - cmd(archiver, "key", "import", export_file, exit_code=2) + expected_ec = RepoIdMismatch().exit_code + cmd(archiver, "key", "import", export_file, exit_code=expected_ec) else: with pytest.raises(RepoIdMismatch): cmd(archiver, "key", "import", export_file) diff --git a/src/borg/testsuite/archiver/rcreate_cmd.py b/src/borg/testsuite/archiver/rcreate_cmd.py index 48c9dc162..b027ca1a8 100644 --- a/src/borg/testsuite/archiver/rcreate_cmd.py +++ b/src/borg/testsuite/archiver/rcreate_cmd.py @@ -56,7 +56,8 @@ def test_rcreate_nested_repositories(archivers, request): cmd(archiver, "rcreate", RK_ENCRYPTION) archiver.repository_location += "/nested" if archiver.FORK_DEFAULT: - cmd(archiver, "rcreate", RK_ENCRYPTION, exit_code=2) + expected_ec = Repository.AlreadyExists().exit_code + cmd(archiver, "rcreate", RK_ENCRYPTION, exit_code=expected_ec) else: with pytest.raises(Repository.AlreadyExists): cmd(archiver, "rcreate", RK_ENCRYPTION) diff --git a/src/borg/testsuite/archiver/rdelete_cmd.py b/src/borg/testsuite/archiver/rdelete_cmd.py index e18eee460..99dc6f2a7 100644 --- a/src/borg/testsuite/archiver/rdelete_cmd.py +++ b/src/borg/testsuite/archiver/rdelete_cmd.py @@ -18,7 +18,8 @@ def test_delete_repo(archivers, request): cmd(archiver, "create", "test.2", "input") os.environ["BORG_DELETE_I_KNOW_WHAT_I_AM_DOING"] = "no" if archiver.FORK_DEFAULT: - cmd(archiver, "rdelete", exit_code=2) + expected_ec = CancelledByUser().exit_code + cmd(archiver, "rdelete", exit_code=expected_ec) else: with pytest.raises(CancelledByUser): cmd(archiver, "rdelete") diff --git a/src/borg/testsuite/archiver/recreate_cmd.py b/src/borg/testsuite/archiver/recreate_cmd.py index fc7f8d1b9..b21a73fc8 100644 --- a/src/borg/testsuite/archiver/recreate_cmd.py +++ b/src/borg/testsuite/archiver/recreate_cmd.py @@ -84,7 +84,8 @@ def test_recreate_target_rc(archivers, request): archiver = request.getfixturevalue(archivers) cmd(archiver, "rcreate", RK_ENCRYPTION) if archiver.FORK_DEFAULT: - output = cmd(archiver, "recreate", "--target=asdf", exit_code=2) + expected_ec = CommandError().exit_code + output = cmd(archiver, "recreate", "--target=asdf", exit_code=expected_ec) assert "Need to specify single archive" in output else: with pytest.raises(CommandError):