summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Waldmann <tw@waldmann-edv.de>2017-03-27 01:58:19 +0200
committerThomas Waldmann <tw@waldmann-edv.de>2017-03-27 01:58:19 +0200
commit85bfcd439c3d8d3e674b013db8146343c902361d (patch)
treec9ef90475f32d8ed77ea33354af9aea1a5288559
parentacd3da62f4a764721e1c5e2f40e8b2659ed4d989 (diff)
ran setup.py build_man
-rw-r--r--docs/man/borg-break-lock.12
-rw-r--r--docs/man/borg-change-passphrase.12
-rw-r--r--docs/man/borg-check.12
-rw-r--r--docs/man/borg-common.17
-rw-r--r--docs/man/borg-compression.18
-rw-r--r--docs/man/borg-create.145
-rw-r--r--docs/man/borg-delete.14
-rw-r--r--docs/man/borg-diff.132
-rw-r--r--docs/man/borg-extract.18
-rw-r--r--docs/man/borg-info.18
-rw-r--r--docs/man/borg-init.12
-rw-r--r--docs/man/borg-key-change-passphrase.12
-rw-r--r--docs/man/borg-key-export.15
-rw-r--r--docs/man/borg-key-import.12
-rw-r--r--docs/man/borg-key-migrate-to-repokey.12
-rw-r--r--docs/man/borg-key.12
-rw-r--r--docs/man/borg-list.155
-rw-r--r--docs/man/borg-mount.12
-rw-r--r--docs/man/borg-patterns.182
-rw-r--r--docs/man/borg-placeholders.12
-rw-r--r--docs/man/borg-prune.12
-rw-r--r--docs/man/borg-recreate.118
-rw-r--r--docs/man/borg-rename.12
-rw-r--r--docs/man/borg-serve.12
-rw-r--r--docs/man/borg-umount.12
-rw-r--r--docs/man/borg-upgrade.12
-rw-r--r--docs/man/borg-with-lock.12
-rw-r--r--docs/man/borg.16
28 files changed, 229 insertions, 81 deletions
diff --git a/docs/man/borg-break-lock.1 b/docs/man/borg-break-lock.1
index b8162436b..6f9f73e0d 100644
--- a/docs/man/borg-break-lock.1
+++ b/docs/man/borg-break-lock.1
@@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
-.TH BORG-BREAK-LOCK 1 "2017-02-11" "" "borg backup tool"
+.TH BORG-BREAK-LOCK 1 "2017-03-26" "" "borg backup tool"
.SH NAME
borg-break-lock \- Break the repository lock (e.g. in case it was left by a dead borg.
.
diff --git a/docs/man/borg-change-passphrase.1 b/docs/man/borg-change-passphrase.1
index b74dd336b..2c8f90c58 100644
--- a/docs/man/borg-change-passphrase.1
+++ b/docs/man/borg-change-passphrase.1
@@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
-.TH BORG-CHANGE-PASSPHRASE 1 "2017-02-11" "" "borg backup tool"
+.TH BORG-CHANGE-PASSPHRASE 1 "2017-03-26" "" "borg backup tool"
.SH NAME
borg-change-passphrase \- Change repository key file passphrase
.
diff --git a/docs/man/borg-check.1 b/docs/man/borg-check.1
index 8a0ec36bf..3545a4d60 100644
--- a/docs/man/borg-check.1
+++ b/docs/man/borg-check.1
@@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
-.TH BORG-CHECK 1 "2017-02-11" "" "borg backup tool"
+.TH BORG-CHECK 1 "2017-03-26" "" "borg backup tool"
.SH NAME
borg-check \- Check repository consistency
.
diff --git a/docs/man/borg-common.1 b/docs/man/borg-common.1
index e480c1f8d..a10838f4d 100644
--- a/docs/man/borg-common.1
+++ b/docs/man/borg-common.1
@@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
-.TH BORG-COMMON 1 "2017-02-11" "" "borg backup tool"
+.TH BORG-COMMON 1 "2017-03-26" "" "borg backup tool"
.SH NAME
borg-common \- Common options of Borg commands
.
@@ -54,6 +54,9 @@ enable debug output, work on log level DEBUG
.BI \-\-debug\-topic \ TOPIC
enable TOPIC debugging (can be specified multiple times). The logger path is borg.debug.<TOPIC> if TOPIC is not fully qualified.
.TP
+.B \-\-log\-json
+Output one JSON object per log line instead of formatted text.
+.TP
.BI \-\-lock\-wait \ N
wait for the lock, but max. N seconds (default: 1).
.TP
@@ -70,7 +73,7 @@ do not load/update the file metadata cache used to detect unchanged files
set umask to M (local and remote, default: 0077)
.TP
.BI \-\-remote\-path \ PATH
-set remote path to executable (default: "borg")
+use PATH as borg executable on the remote (default: "borg")
.TP
.BI \-\-remote\-ratelimit \ rate
set remote network upload rate limit in kiByte/s (default: 0=unlimited)
diff --git a/docs/man/borg-compression.1 b/docs/man/borg-compression.1
index 51124fea3..e0a98ed12 100644
--- a/docs/man/borg-compression.1
+++ b/docs/man/borg-compression.1
@@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
-.TH BORG-COMPRESSION 1 "2017-02-11" "" "borg backup tool"
+.TH BORG-COMPRESSION 1 "2017-03-26" "" "borg backup tool"
.SH NAME
borg-compression \- Details regarding compression
.
@@ -32,21 +32,21 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
..
.SH DESCRIPTION
.sp
-Compression is off by default, if you want some, you have to specify what you want.
+Compression is lz4 by default. If you want something else, you have to specify what you want.
.sp
Valid compression specifiers are:
.sp
none
.INDENT 0.0
.INDENT 3.5
-Do not compress. (default)
+Do not compress.
.UNINDENT
.UNINDENT
.sp
lz4
.INDENT 0.0
.INDENT 3.5
-Use lz4 compression. High speed, low compression.
+Use lz4 compression. High speed, low compression. (default)
.UNINDENT
.UNINDENT
.sp
diff --git a/docs/man/borg-create.1 b/docs/man/borg-create.1
index d01d77e27..c0a7ab961 100644
--- a/docs/man/borg-create.1
+++ b/docs/man/borg-create.1
@@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
-.TH BORG-CREATE 1 "2017-02-12" "" "borg backup tool"
+.TH BORG-CREATE 1 "2017-03-26" "" "borg backup tool"
.SH NAME
borg-create \- Create new archive
.
@@ -36,9 +36,12 @@ borg create <options> ARCHIVE PATH
.SH DESCRIPTION
.sp
This command creates a backup archive containing all files found while recursively
-traversing all paths specified. 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.
+traversing all paths specified. Paths are added to the archive as they are given,
+that means if relative paths are desired, the command has to be run from the correct
+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.
.sp
The archive will consume almost no disk space for files or parts of files that
have already been stored in other archives.
@@ -55,6 +58,11 @@ not provide correct inode information the \-\-ignore\-inode flag can be used. Th
potentially decreases reliability of change detection, while avoiding always reading
all files on these file systems.
.sp
+The mount points of filesystems or filesystem snapshots should be the same for every
+creation of a new archive to ensure fast operation. This is because the file cache that
+is used to determine changed files quickly uses absolute filenames.
+If this is not possible, consider creating a bind mount to a stable location.
+.sp
See the output of the "borg help patterns" command for more help on exclude patterns.
See the output of the "borg help placeholders" command for more help on placeholders.
.SH OPTIONS
@@ -86,6 +94,9 @@ output verbose list of items (files, dirs, ...)
.TP
.BI \-\-filter \ STATUSCHARS
only display items with the given status characters
+.TP
+.B \-\-json
+output stats as JSON (implies \-\-stats)
.UNINDENT
.SS Exclusion options
.INDENT 0.0
@@ -103,13 +114,19 @@ exclude directories that contain a CACHEDIR.TAG file (\fI\%http://www.brynosauru
exclude directories that are tagged by containing a filesystem object with the given NAME
.TP
.B \-\-keep\-exclude\-tags\fP,\fB \-\-keep\-tag\-files
-keep tag objects (i.e.: arguments to \-\-exclude\-if\-present) in otherwise excluded caches/directories
+if tag objects are specified with \-\-exclude\-if\-present, don\(aqt omit the tag objects themselves from the backup archive
+.TP
+.BI \-\-pattern \ PATTERN
+include/exclude paths matching PATTERN
+.TP
+.BI \-\-patterns\-from \ PATTERNFILE
+read include/exclude patterns from PATTERNFILE, one per line
.UNINDENT
.SS Filesystem options
.INDENT 0.0
.TP
.B \-x\fP,\fB \-\-one\-file\-system
-stay in same file system, do not cross mount points
+stay in the same file system and do not store mount points of other file systems
.TP
.B \-\-numeric\-owner
only store numeric user and group identifiers
@@ -175,7 +192,7 @@ $ borg create /path/to/repo::my\-files /home \e
\-\-exclude \(aqsh:/home/*/.thumbnails\(aq
# Backup the root filesystem into an archive named "root\-YYYY\-MM\-DD"
-# use zlib compression (good, but slow) \- default is no compression
+# use zlib compression (good, but slow) \- default is lz4 (fast, low compression ratio)
$ borg create \-C zlib,6 /path/to/repo::root\-{now:%Y\-%m\-%d} / \-\-one\-file\-system
# Backup a remote host locally ("pull" style) using sshfs
@@ -212,6 +229,11 @@ $ borg create /path/to/repo::{hostname}\-{user}\-{now} ~
$ borg create /path/to/repo::{hostname}\-{user}\-{now:%Y\-%m\-%dT%H:%M:%S} ~
# As above, but add nanoseconds
$ borg create /path/to/repo::{hostname}\-{user}\-{now:%Y\-%m\-%dT%H:%M:%S.%f} ~
+
+# Backing up relative paths by moving into the correct directory first
+$ cd /home/user/Documents
+# The root directory of the archive will be "projectA"
+$ borg create /path/to/repo::daily\-projectA\-{now:%Y\-%m\-%d} projectA
.ft P
.fi
.UNINDENT
@@ -222,6 +244,15 @@ The \-\-exclude patterns are not like tar. In tar \-\-exclude .bundler/gems will
exclude foo/.bundler/gems. In borg it will not, you need to use \-\-exclude
\(aq*/.bundler/gems\(aq to get the same effect. See \fBborg help patterns\fP for
more information.
+.sp
+In addition to using \fB\-\-exclude\fP patterns, it is possible to use
+\fB\-\-exclude\-if\-present\fP to specify the name of a filesystem object (e.g. a file
+or folder name) which, when contained within another folder, will prevent the
+containing folder from being backed up. By default, the containing folder and
+all of its contents will be omitted from the backup. If, however, you wish to
+only include the objects specified by \fB\-\-exclude\-if\-present\fP in your backup,
+and not include any other contents of the containing folder, this can be enabled
+through using the \fB\-\-keep\-exclude\-tags\fP option.
.SS Item flags
.sp
\fB\-\-list\fP outputs a list of all files, directories and other
diff --git a/docs/man/borg-delete.1 b/docs/man/borg-delete.1
index 5b0ec5296..01e2167de 100644
--- a/docs/man/borg-delete.1
+++ b/docs/man/borg-delete.1
@@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
-.TH BORG-DELETE 1 "2017-02-11" "" "borg backup tool"
+.TH BORG-DELETE 1 "2017-03-26" "" "borg backup tool"
.SH NAME
borg-delete \- Delete an existing repository or archives
.
@@ -60,7 +60,7 @@ print statistics for the deleted archive
delete only the local cache for the given repository
.TP
.B \-\-force
-force deletion of corrupted archives
+force deletion of corrupted archives, use \-\-force \-\-force in case \-\-force does not work.
.TP
.B \-\-save\-space
work slower, but using less space
diff --git a/docs/man/borg-diff.1 b/docs/man/borg-diff.1
index f488a72ac..dd0ec88c2 100644
--- a/docs/man/borg-diff.1
+++ b/docs/man/borg-diff.1
@@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
-.TH BORG-DIFF 1 "2017-02-11" "" "borg backup tool"
+.TH BORG-DIFF 1 "2017-03-26" "" "borg backup tool"
.SH NAME
borg-diff \- Diff contents of two archives
.
@@ -69,12 +69,6 @@ paths of items inside the archives to compare; patterns are supported
.SS optional arguments
.INDENT 0.0
.TP
-.BI \-e \ PATTERN\fP,\fB \ \-\-exclude \ PATTERN
-exclude paths matching PATTERN
-.TP
-.BI \-\-exclude\-from \ EXCLUDEFILE
-read exclude patterns from EXCLUDEFILE, one per line
-.TP
.B \-\-numeric\-owner
only consider numeric user and group identifiers
.TP
@@ -84,6 +78,30 @@ Override check of chunker parameters.
.B \-\-sort
Sort the output lines by file path.
.UNINDENT
+.SS Exclusion options
+.INDENT 0.0
+.TP
+.BI \-e \ PATTERN\fP,\fB \ \-\-exclude \ PATTERN
+exclude paths matching PATTERN
+.TP
+.BI \-\-exclude\-from \ EXCLUDEFILE
+read exclude patterns from EXCLUDEFILE, one per line
+.TP
+.B \-\-exclude\-caches
+exclude directories that contain a CACHEDIR.TAG file (\fI\%http://www.brynosaurus.com/cachedir/spec.html\fP)
+.TP
+.BI \-\-exclude\-if\-present \ NAME
+exclude directories that are tagged by containing a filesystem object with the given NAME
+.TP
+.B \-\-keep\-exclude\-tags\fP,\fB \-\-keep\-tag\-files
+if tag objects are specified with \-\-exclude\-if\-present, don\(aqt omit the tag objects themselves from the backup archive
+.TP
+.BI \-\-pattern \ PATTERN
+include/exclude paths matching PATTERN
+.TP
+.BI \-\-patterns\-from \ PATTERNFILE
+read include/exclude patterns from PATTERNFILE, one per line
+.UNINDENT
.SH EXAMPLES
.INDENT 0.0
.INDENT 3.5
diff --git a/docs/man/borg-extract.1 b/docs/man/borg-extract.1
index 426be31e0..089635c8c 100644
--- a/docs/man/borg-extract.1
+++ b/docs/man/borg-extract.1
@@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
-.TH BORG-EXTRACT 1 "2017-02-11" "" "borg backup tool"
+.TH BORG-EXTRACT 1 "2017-03-26" "" "borg backup tool"
.SH NAME
borg-extract \- Extract archive contents
.
@@ -75,6 +75,12 @@ exclude paths matching PATTERN
.BI \-\-exclude\-from \ EXCLUDEFILE
read exclude patterns from EXCLUDEFILE, one per line
.TP
+.BI \-\-pattern \ PATTERN
+include/exclude paths matching PATTERN
+.TP
+.BI \-\-patterns\-from \ PATTERNFILE
+read include/exclude patterns from PATTERNFILE, one per line
+.TP
.B \-\-numeric\-owner
only obey numeric user and group identifiers
.TP
diff --git a/docs/man/borg-info.1 b/docs/man/borg-info.1
index 305f18fad..b75e44ff9 100644
--- a/docs/man/borg-info.1
+++ b/docs/man/borg-info.1
@@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
-.TH BORG-INFO 1 "2017-02-11" "" "borg backup tool"
+.TH BORG-INFO 1 "2017-03-26" "" "borg backup tool"
.SH NAME
borg-info \- Show archive details such as disk space used
.
@@ -57,6 +57,12 @@ See \fIborg\-common(1)\fP for common options of Borg commands.
.B REPOSITORY_OR_ARCHIVE
archive or repository to display information about
.UNINDENT
+.SS optional arguments
+.INDENT 0.0
+.TP
+.B \-\-json
+format output as JSON
+.UNINDENT
.SS filters
.INDENT 0.0
.TP
diff --git a/docs/man/borg-init.1 b/docs/man/borg-init.1
index bbe020c43..2b489ff93 100644
--- a/docs/man/borg-init.1
+++ b/docs/man/borg-init.1
@@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
-.TH BORG-INIT 1 "2017-02-11" "" "borg backup tool"
+.TH BORG-INIT 1 "2017-03-26" "" "borg backup tool"
.SH NAME
borg-init \- Initialize an empty repository
.
diff --git a/docs/man/borg-key-change-passphrase.1 b/docs/man/borg-key-change-passphrase.1
index 86a30ebfa..7b1a71fab 100644
--- a/docs/man/borg-key-change-passphrase.1
+++ b/docs/man/borg-key-change-passphrase.1
@@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
-.TH BORG-KEY-CHANGE-PASSPHRASE 1 "2017-02-11" "" "borg backup tool"
+.TH BORG-KEY-CHANGE-PASSPHRASE 1 "2017-03-26" "" "borg backup tool"
.SH NAME
borg-key-change-passphrase \- Change repository key file passphrase
.
diff --git a/docs/man/borg-key-export.1 b/docs/man/borg-key-export.1
index 672023032..8cfe1505a 100644
--- a/docs/man/borg-key-export.1
+++ b/docs/man/borg-key-export.1
@@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
-.TH BORG-KEY-EXPORT 1 "2017-02-11" "" "borg backup tool"
+.TH BORG-KEY-EXPORT 1 "2017-03-26" "" "borg backup tool"
.SH NAME
borg-key-export \- Export the repository key for backup
.
@@ -68,6 +68,9 @@ where to store the backup
.TP
.B \-\-paper
Create an export suitable for printing and later type\-in
+.TP
+.B \-\-qr\-html
+Create an html file suitable for printing and later type\-in or qr scan
.UNINDENT
.SH SEE ALSO
.sp
diff --git a/docs/man/borg-key-import.1 b/docs/man/borg-key-import.1
index 91ce569dd..0a5a32453 100644
--- a/docs/man/borg-key-import.1
+++ b/docs/man/borg-key-import.1
@@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
-.TH BORG-KEY-IMPORT 1 "2017-02-11" "" "borg backup tool"
+.TH BORG-KEY-IMPORT 1 "2017-03-26" "" "borg backup tool"
.SH NAME
borg-key-import \- Import the repository key from backup
.
diff --git a/docs/man/borg-key-migrate-to-repokey.1 b/docs/man/borg-key-migrate-to-repokey.1
index 774c9199b..efda66e1d 100644
--- a/docs/man/borg-key-migrate-to-repokey.1
+++ b/docs/man/borg-key-migrate-to-repokey.1
@@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
-.TH BORG-KEY-MIGRATE-TO-REPOKEY 1 "2017-02-11" "" "borg backup tool"
+.TH BORG-KEY-MIGRATE-TO-REPOKEY 1 "2017-03-26" "" "borg backup tool"
.SH NAME
borg-key-migrate-to-repokey \- Migrate passphrase -> repokey
.
diff --git a/docs/man/borg-key.1 b/docs/man/borg-key.1
index ca1ec2eb3..e0c878d64 100644
--- a/docs/man/borg-key.1
+++ b/docs/man/borg-key.1
@@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
-.TH BORG-KEY 1 "2017-02-12" "" "borg backup tool"
+.TH BORG-KEY 1 "2017-03-26" "" "borg backup tool"
.SH NAME
borg-key \- Manage a keyfile or repokey of a repository
.
diff --git a/docs/man/borg-list.1 b/docs/man/borg-list.1
index 74e5a2780..be02614e0 100644
--- a/docs/man/borg-list.1
+++ b/docs/man/borg-list.1
@@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
-.TH BORG-LIST 1 "2017-02-12" "" "borg backup tool"
+.TH BORG-LIST 1 "2017-03-26" "" "borg backup tool"
.SH NAME
borg-list \- List archive or repository contents
.
@@ -60,11 +60,8 @@ only print file/directory names, nothing else
specify format for file listing
(default: "{mode} {user:6} {group:6} {size:8d} {isomtime} {path}{extra}{NL}")
.TP
-.BI \-e \ PATTERN\fP,\fB \ \-\-exclude \ PATTERN
-exclude paths matching PATTERN
-.TP
-.BI \-\-exclude\-from \ EXCLUDEFILE
-read exclude patterns from EXCLUDEFILE, one per line
+.B \-\-json
+format output as JSON. 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. A "bpath" key is therefore not available.
.UNINDENT
.SS filters
.INDENT 0.0
@@ -81,6 +78,30 @@ consider first N archives after other filters were applied
.BI \-\-last \ N
consider last N archives after other filters were applied
.UNINDENT
+.SS Exclusion options
+.INDENT 0.0
+.TP
+.BI \-e \ PATTERN\fP,\fB \ \-\-exclude \ PATTERN
+exclude paths matching PATTERN
+.TP
+.BI \-\-exclude\-from \ EXCLUDEFILE
+read exclude patterns from EXCLUDEFILE, one per line
+.TP
+.B \-\-exclude\-caches
+exclude directories that contain a CACHEDIR.TAG file (\fI\%http://www.brynosaurus.com/cachedir/spec.html\fP)
+.TP
+.BI \-\-exclude\-if\-present \ NAME
+exclude directories that are tagged by containing a filesystem object with the given NAME
+.TP
+.B \-\-keep\-exclude\-tags\fP,\fB \-\-keep\-tag\-files
+if tag objects are specified with \-\-exclude\-if\-present, don\(aqt omit the tag objects themselves from the backup archive
+.TP
+.BI \-\-pattern \ PATTERN
+include/exclude paths matching PATTERN
+.TP
+.BI \-\-patterns\-from \ PATTERNFILE
+read include/exclude patterns from PATTERNFILE, one per line
+.UNINDENT
.SH EXAMPLES
.INDENT 0.0
.INDENT 3.5
@@ -141,7 +162,7 @@ Keys for listing repository archives:
.INDENT 3.5
.INDENT 0.0
.IP \(bu 2
-archive: archive name interpreted as text (might be missing non\-text characters, see barchive)
+archive, name: archive name interpreted as text (might be missing non\-text characters, see barchive)
.IP \(bu 2
barchive: verbatim archive name, can contain any character except NUL
.IP \(bu 2
@@ -183,6 +204,10 @@ size
.IP \(bu 2
csize: compressed size
.IP \(bu 2
+dsize: deduplicated size
+.IP \(bu 2
+dcsize: deduplicated compressed size
+.IP \(bu 2
num_chunks: number of chunks in this file
.IP \(bu 2
unique_chunks: number of unique chunks in this file
@@ -199,10 +224,6 @@ isoctime
.IP \(bu 2
isoatime
.IP \(bu 2
-blake2b
-.IP \(bu 2
-blake2s
-.IP \(bu 2
md5
.IP \(bu 2
sha1
@@ -213,20 +234,8 @@ 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
archiveid
.IP \(bu 2
archivename
diff --git a/docs/man/borg-mount.1 b/docs/man/borg-mount.1
index 63a12ceec..cb8ad26ba 100644
--- a/docs/man/borg-mount.1
+++ b/docs/man/borg-mount.1
@@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
-.TH BORG-MOUNT 1 "2017-02-11" "" "borg backup tool"
+.TH BORG-MOUNT 1 "2017-03-26" "" "borg backup tool"
.SH NAME
borg-mount \- Mount archive or an entire repository as a FUSE filesystem
.
diff --git a/docs/man/borg-patterns.1 b/docs/man/borg-patterns.1
index 646694bfc..c250a4b92 100644
--- a/docs/man/borg-patterns.1
+++ b/docs/man/borg-patterns.1
@@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
-.TH BORG-PATTERNS 1 "2017-02-11" "" "borg backup tool"
+.TH BORG-PATTERNS 1 "2017-03-26" "" "borg backup tool"
.SH NAME
borg-patterns \- Details regarding patterns
.
@@ -32,8 +32,9 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
..
.SH DESCRIPTION
.sp
-Exclusion patterns support four separate styles, fnmatch, shell, regular
-expressions and path prefixes. By default, fnmatch is used. If followed
+File patterns support these styles: fnmatch, shell, regular expressions,
+path prefixes and path full\-matches. By default, fnmatch is used for
+\fI\-\-exclude\fP patterns and shell\-style is used for \fI\-\-pattern\fP\&. If followed
by a colon (\(aq:\(aq) the first two characters of a pattern are used as a
style selector. Explicit style selection is necessary when a
non\-default style is desired or when the desired pattern starts with
@@ -42,12 +43,12 @@ two alphanumeric characters followed by a colon (i.e. \fIaa:something/*\fP).
\fI\%Fnmatch\fP, selector \fIfm:\fP
.INDENT 0.0
.INDENT 3.5
-This is the default style. These patterns use a variant of shell
-pattern syntax, with \(aq*\(aq matching any number of characters, \(aq?\(aq
-matching any single character, \(aq[...]\(aq matching any single
-character specified, including ranges, and \(aq[!...]\(aq matching any
-character not specified. For the purpose of these patterns, the
-path separator (\(aq\(aq for Windows and \(aq/\(aq on other systems) is not
+This is the default style for \-\-exclude and \-\-exclude\-from.
+These patterns use a variant of shell pattern syntax, with \(aq*\(aq matching
+any number of characters, \(aq?\(aq matching any single character, \(aq[...]\(aq
+matching any single character specified, including ranges, and \(aq[!...]\(aq
+matching any character not specified. For the purpose of these patterns,
+the path separator (\(aq\(aq for Windows and \(aq/\(aq on other systems) is not
treated specially. Wrap meta\-characters in brackets for a literal
match (i.e. \fI[?]\fP to match the literal character \fI?\fP). For a path
to match a pattern, it must completely match from start to end, or
@@ -61,6 +62,7 @@ separator, a \(aq*\(aq is appended before matching is attempted.
Shell\-style patterns, selector \fIsh:\fP
.INDENT 0.0
.INDENT 3.5
+This is the default style for \-\-pattern and \-\-patterns\-from.
Like fnmatch patterns these are similar to shell patterns. The difference
is that the pattern may include \fI**/\fP for matching zero or more directory
levels, \fI*\fP for matching zero or more arbitrary characters with the
@@ -82,7 +84,7 @@ the re module\fP\&.
.UNINDENT
.UNINDENT
.sp
-Prefix path, selector \fIpp:\fP
+Path prefix, selector \fIpp:\fP
.INDENT 0.0
.INDENT 3.5
This pattern style is useful to match whole sub\-directories. The pattern
@@ -90,6 +92,25 @@ This pattern style is useful to match whole sub\-directories. The pattern
.UNINDENT
.UNINDENT
.sp
+Path full\-match, selector \fIpf:\fP
+.INDENT 0.0
+.INDENT 3.5
+This pattern style is useful to match whole paths.
+This is kind of a pseudo pattern as it can not have any variable or
+unspecified parts \- the full, precise path must be given.
+\fIpf:/data/foo.txt\fP matches \fI/data/foo.txt\fP only.
+.sp
+Implementation note: this is implemented via very time\-efficient O(1)
+hashtable lookups (this means you can have huge amounts of such patterns
+without impacting performance much).
+Due to that, this kind of pattern does not respect any context or order.
+If you use such a pattern to include a file, it will always be included
+(if the directory recursion encounters it).
+Other include/exclude patterns that would normally match will be ignored.
+Same logic applies for exclude.
+.UNINDENT
+.UNINDENT
+.sp
Exclusions can be passed via the command line option \fI\-\-exclude\fP\&. When used
from within a shell the patterns should be quoted to protect them from
expansion.
@@ -138,6 +159,47 @@ $ borg create \-\-exclude\-from exclude.txt backup /
.fi
.UNINDENT
.UNINDENT
+.sp
+A more general and easier to use way to define filename matching patterns exists
+with the \fI\-\-pattern\fP and \fI\-\-patterns\-from\fP options. Using these, you may specify
+the backup roots (starting points) and patterns for inclusion/exclusion. A
+root path starts with the prefix \fIR\fP, followed by a path (a plain path, not a
+file pattern). An include rule starts with the prefix +, an exclude rule starts
+with the prefix \-, both followed by a pattern.
+Inclusion patterns are useful to include pathes that are contained in an excluded
+path. The first matching pattern is used so if an include pattern matches before
+an exclude pattern, the file is backed up.
+.sp
+Note that the default pattern style for \fI\-\-pattern\fP and \fI\-\-patterns\-from\fP is
+shell style (\fIsh:\fP), so those patterns behave similar to rsync include/exclude
+patterns. The pattern style can be set via the \fIP\fP prefix.
+.sp
+Patterns (\fI\-\-pattern\fP) and excludes (\fI\-\-exclude\fP) from the command line are
+considered first (in the order of appearance). Then patterns from \fI\-\-patterns\-from\fP
+are added. Exclusion patterns from \fI\-\-exclude\-from\fP files are appended last.
+.sp
+An example \fI\-\-patterns\-from\fP file could look like that:
+.INDENT 0.0
+.INDENT 3.5
+.sp
+.nf
+.ft C
+# "sh:" pattern style is the default, so the following line is not needed:
+P sh
+R /
+# can be rebuild
+\- /home/*/.cache
+# they\(aqre downloads for a reason
+\- /home/*/Downloads
+# susan is a nice person
+# include susans home
++ /home/susan
+# don\(aqt backup the other home directories
+\- /home/*
+.ft P
+.fi
+.UNINDENT
+.UNINDENT
.SH AUTHOR
The Borg Collective
.\" Generated by docutils manpage writer.
diff --git a/docs/man/borg-placeholders.1 b/docs/man/borg-placeholders.1
index 49cfb6dc7..aa62bb9b6 100644
--- a/docs/man/borg-placeholders.1
+++ b/docs/man/borg-placeholders.1
@@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
-.TH BORG-PLACEHOLDERS 1 "2017-02-11" "" "borg backup tool"
+.TH BORG-PLACEHOLDERS 1 "2017-03-26" "" "borg backup tool"
.SH NAME
borg-placeholders \- Details regarding placeholders
.
diff --git a/docs/man/borg-prune.1 b/docs/man/borg-prune.1
index ff8afa1d5..135415447 100644
--- a/docs/man/borg-prune.1
+++ b/docs/man/borg-prune.1
@@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
-.TH BORG-PRUNE 1 "2017-02-11" "" "borg backup tool"
+.TH BORG-PRUNE 1 "2017-03-26" "" "borg backup tool"
.SH NAME
borg-prune \- Prune repository archives according to specified rules
.
diff --git a/docs/man/borg-recreate.1 b/docs/man/borg-recreate.1
index db822491d..c7e304207 100644
--- a/docs/man/borg-recreate.1
+++ b/docs/man/borg-recreate.1
@@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
-.TH BORG-RECREATE 1 "2017-02-11" "" "borg backup tool"
+.TH BORG-RECREATE 1 "2017-03-26" "" "borg backup tool"
.SH NAME
borg-recreate \- Re-create archives
.
@@ -39,9 +39,9 @@ Recreate the contents of existing archives.
.sp
This is an \fIexperimental\fP feature. Do \fInot\fP use this on your only backup.
.sp
-\-\-exclude, \-\-exclude\-from 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". If PATHs are specified the
+resulting archive 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 (\-\-exclude, \-\-exclude\-from, \-\-compression\-from, PATHs).
@@ -114,10 +114,16 @@ read exclude patterns from EXCLUDEFILE, one per line
exclude directories that contain a CACHEDIR.TAG file (\fI\%http://www.brynosaurus.com/cachedir/spec.html\fP)
.TP
.BI \-\-exclude\-if\-present \ NAME
-exclude directories that are tagged by containing a filesystem object with the given NAME
+exclude directories that are tagged by containing a filesystem object with the given NAME
.TP
.B \-\-keep\-exclude\-tags\fP,\fB \-\-keep\-tag\-files
-keep tag objects (i.e.: arguments to \-\-exclude\-if\-present) in otherwise excluded caches/directories
+if tag objects are specified with \-\-exclude\-if\-present, don\(aqt omit the tag objects themselves from the backup archive
+.TP
+.BI \-\-pattern \ PATTERN
+include/exclude paths matching PATTERN
+.TP
+.BI \-\-patterns\-from \ PATTERNFILE
+read include/exclude patterns from PATTERNFILE, one per line
.UNINDENT
.SS Archive options
.INDENT 0.0
diff --git a/docs/man/borg-rename.1 b/docs/man/borg-rename.1
index e3c1ee773..764