2016-06-07 16:17:02 +02:00
|
|
|
.TH "btrbk.conf" "5" "2016-06-07" "btrbk v0.23.2-dev" ""
|
2015-09-03 18:02:19 +02:00
|
|
|
.\" disable hyphenation
|
|
|
|
.nh
|
|
|
|
.\" disable justification (adjust text to left margin only)
|
|
|
|
.ad l
|
2015-02-08 13:43:29 +01:00
|
|
|
.SH NAME
|
|
|
|
btrbk.conf \- btrbk configuration file
|
|
|
|
.SH SYNOPSIS
|
|
|
|
.B /etc/btrbk.conf
|
|
|
|
.br
|
|
|
|
.B /etc/btrbk/btrbk.conf
|
|
|
|
.SH DESCRIPTION
|
|
|
|
The btrbk configuration file specifies which btrfs subvolumes on the
|
|
|
|
filesystem are to be processed, what target subvolumes should be used
|
|
|
|
to create the backups, and where the snapshots should be
|
2015-05-25 17:13:36 +02:00
|
|
|
generated. The retention policy, as well as most other options can be
|
|
|
|
defined either globally or within a section.
|
2015-02-08 13:43:29 +01:00
|
|
|
.PP
|
|
|
|
The options specified always apply to the last section encountered,
|
2015-04-18 20:18:11 +02:00
|
|
|
superseding the values set in upper-level sections. This means that
|
2015-02-08 13:43:29 +01:00
|
|
|
global options must be set before any sections are defined.
|
2015-09-29 15:59:15 +02:00
|
|
|
.SH SECTIONS
|
2015-09-03 18:02:19 +02:00
|
|
|
.PP
|
2016-05-03 15:54:35 +02:00
|
|
|
\fBvolume\fR <volume\-directory>|<url>
|
2015-09-03 18:02:19 +02:00
|
|
|
.RS 4
|
2015-04-28 19:08:20 +02:00
|
|
|
Directory of a btrfs volume containing the source subvolume(s) to be
|
2016-05-03 15:54:35 +02:00
|
|
|
backed up. \fI<volume\-directory>\fR must be an absolute path and
|
|
|
|
point to a btrfs volume (or subvolume). Usually the mount point of a
|
|
|
|
btrfs filesystem mounted with the \fIsubvolid=0\fR option.
|
2015-09-03 18:02:19 +02:00
|
|
|
.RE
|
|
|
|
.PP
|
2016-05-03 15:54:35 +02:00
|
|
|
\fBsubvolume\fR <subvolume\-name>
|
2015-09-03 18:02:19 +02:00
|
|
|
.RS 4
|
2016-05-03 15:54:35 +02:00
|
|
|
Subvolume to be backed up, relative to the \fI<volume\-directory>\fR
|
2015-09-29 15:59:15 +02:00
|
|
|
specified in the \fIvolume\fR section. Multiple \fIsubvolume\fR
|
|
|
|
sections are allowed within \fIvolume\fR sections.
|
2015-09-03 18:02:19 +02:00
|
|
|
.RE
|
|
|
|
.PP
|
2016-05-03 15:54:35 +02:00
|
|
|
\fBtarget\fR <type> <target\-directory>|<url>
|
2015-09-03 18:02:19 +02:00
|
|
|
.RS 4
|
2015-02-08 13:43:29 +01:00
|
|
|
Target type and directory where the backup subvolumes are to be
|
2015-09-29 15:59:15 +02:00
|
|
|
created. See the TARGET TYPES section for supported
|
|
|
|
\fI<type>\fR. Multiple \fItarget\fR sections are allowed within
|
2016-03-31 13:53:00 +02:00
|
|
|
\fIsubvolume\fR sections. A \fItarget\fR section defined in the global
|
|
|
|
context or in a \fIvolume\fR section is propagated (mulitplied) to all
|
|
|
|
underlying \fIsubvolume\fR sections, unless a target with the same
|
|
|
|
declaration already exists (hint: run "btrbk config print" to see the
|
|
|
|
resulting configuration).
|
2015-09-29 15:59:15 +02:00
|
|
|
.RE
|
2015-02-08 13:43:29 +01:00
|
|
|
.PP
|
2015-09-29 15:59:15 +02:00
|
|
|
For the \fIvolume\fR and \fItarget\fR sections, you can specify a
|
2016-05-03 15:54:35 +02:00
|
|
|
ssh\-url instead of a local directory. The syntax for \fI<url>\fR is:
|
2015-09-03 18:02:19 +02:00
|
|
|
.PP
|
|
|
|
.RS 4
|
|
|
|
.nf
|
2015-02-08 13:43:29 +01:00
|
|
|
ssh://host.xz/path/to/volume
|
2015-09-03 18:02:19 +02:00
|
|
|
.fi
|
|
|
|
.RE
|
2015-02-08 13:43:29 +01:00
|
|
|
.PP
|
2016-04-25 16:07:40 +02:00
|
|
|
If a \fI<url>\fR is specified, all access to the filesystem is
|
|
|
|
performed via ssh, using the "ssh_" options described below. For
|
|
|
|
convenience, "ssh://<hostname>/<directory>" can also be specified as
|
|
|
|
"<hostname>:<directory>".
|
|
|
|
.PP
|
2015-04-13 23:42:15 +02:00
|
|
|
Note that btrfs is very picky on file names (mainly for security
|
2016-05-03 15:54:35 +02:00
|
|
|
reasons), only the characters [0\-9] [a\-z] [A\-Z] and "._+\-@" are
|
2015-04-13 23:42:15 +02:00
|
|
|
allowed.
|
2015-09-03 18:02:19 +02:00
|
|
|
.RE
|
2015-09-29 15:59:15 +02:00
|
|
|
.SH OPTIONS
|
|
|
|
.PP
|
2015-10-22 17:45:27 +02:00
|
|
|
\fBtransaction_log\fR <file>
|
|
|
|
.RS 4
|
2016-05-03 15:54:35 +02:00
|
|
|
If set, all transactions (snapshot create, subvolume send\-receive,
|
2015-10-22 17:45:27 +02:00
|
|
|
subvolume delete) as well as abort messages are logged to <file>, in a
|
2016-04-28 12:44:33 +02:00
|
|
|
space-separated table format: "localtime type status duration
|
|
|
|
target_url source_url parent_url message".
|
2015-10-22 17:45:27 +02:00
|
|
|
.RE
|
|
|
|
.PP
|
btrbk: add transaction logging to syslog
Add configuration option transaction_syslog, which can be set to a short
name of a syslog facility, like user or local5. Most of the ones besides
localX do not really make sense, but whatever, let the user decide.
The only logging that is relevant for logging to syslog is the logging
generated inside sub action, so it's easy to hijack all messages in
there and also send them to syslog if needed.
All output is done via print_formatted, which expects a file handle.
So, abuse a file handle to a string to be able to change as less code as
needed for this feature.
Since syslog already adds the timestamps for us, I added a syslog
formatting pattern, which is very similar to tlog, omitting the
timestap.
2016-04-22 23:11:00 +02:00
|
|
|
\fBtransaction_syslog\fR <facility>
|
|
|
|
.RS 4
|
2016-04-28 12:44:33 +02:00
|
|
|
If set, all transactions (as described in \fItransaction_log\fR above)
|
|
|
|
are logged to syslog. The facility parameter accepts a lowercase
|
|
|
|
syslog facility name, like \[lq]daemon\[rq] or \[lq]local7\[rq]. The
|
|
|
|
program name used in the messages is "btrbk".
|
btrbk: add transaction logging to syslog
Add configuration option transaction_syslog, which can be set to a short
name of a syslog facility, like user or local5. Most of the ones besides
localX do not really make sense, but whatever, let the user decide.
The only logging that is relevant for logging to syslog is the logging
generated inside sub action, so it's easy to hijack all messages in
there and also send them to syslog if needed.
All output is done via print_formatted, which expects a file handle.
So, abuse a file handle to a string to be able to change as less code as
needed for this feature.
Since syslog already adds the timestamps for us, I added a syslog
formatting pattern, which is very similar to tlog, omitting the
timestap.
2016-04-22 23:11:00 +02:00
|
|
|
.RE
|
|
|
|
.PP
|
2016-05-03 15:54:35 +02:00
|
|
|
\fBtimestamp_format\fR short|long|long\-iso
|
2015-09-29 15:59:15 +02:00
|
|
|
.RS 4
|
2016-04-12 11:47:28 +02:00
|
|
|
Timestamp format used as postfix for new snapshot subvolume
|
|
|
|
names. Defaults to \[lq]short\[rq].
|
2015-11-02 20:09:19 +01:00
|
|
|
.PP
|
2016-04-23 14:37:24 +02:00
|
|
|
.IP \fBshort\fR 10
|
2015-11-02 20:09:19 +01:00
|
|
|
YYYYMMDD[_N] (e.g. "20150825", "20150825_1")
|
2016-04-23 14:37:24 +02:00
|
|
|
.IP \fBlong\fR 10
|
2015-11-02 20:09:19 +01:00
|
|
|
YYYYMMDD<T>hhmm[_N] (e.g. "20150825T1531")
|
2016-05-03 15:54:35 +02:00
|
|
|
.IP \fBlong\-iso\fR 10
|
2016-04-21 13:27:54 +02:00
|
|
|
YYYYMMDD<T>hhmmss\[t+-]hhmm[_N] (e.g. "20150825T153123+0200")
|
2015-09-29 15:59:15 +02:00
|
|
|
.PP
|
2016-04-23 14:37:24 +02:00
|
|
|
Note that a postfix "_N" is appended to the timestamp if a snapshot or
|
|
|
|
backup already exists with the timestamp of current date/time.
|
2016-04-21 13:27:54 +02:00
|
|
|
.PP
|
2016-05-03 15:54:35 +02:00
|
|
|
Use \[lq]long\-iso\[rq] if you want to make sure that btrbk never
|
2016-04-21 13:27:54 +02:00
|
|
|
creates ambiguous time stamps (which can happen if multiple snapshots
|
|
|
|
are created during a daylight saving time clock change).
|
2016-04-23 14:37:24 +02:00
|
|
|
.PP
|
2016-05-03 15:54:35 +02:00
|
|
|
Note that using \[lq]long\-iso\[rq] has implications on the
|
|
|
|
scheduling, see RETENTION POLICY (caveats) below.
|
2015-09-29 15:59:15 +02:00
|
|
|
.RE
|
2015-09-03 18:02:19 +02:00
|
|
|
.PP
|
2015-02-08 13:43:29 +01:00
|
|
|
\fBsnapshot_dir\fR <directory>
|
2015-09-03 18:02:19 +02:00
|
|
|
.RS 4
|
2015-04-18 20:18:11 +02:00
|
|
|
Directory in which the btrfs snapshots are created, relative to
|
2016-05-03 15:54:35 +02:00
|
|
|
\fI<volume\-directory>\fR of the \fIvolume\fR section. Note that btrbk
|
2015-02-08 13:43:29 +01:00
|
|
|
does not autmatically create this directory, and the snapshot creation
|
|
|
|
will fail if it is not present.
|
2015-09-03 18:02:19 +02:00
|
|
|
.RE
|
|
|
|
.PP
|
|
|
|
\fBsnapshot_name\fR <basename>
|
|
|
|
.RS 4
|
|
|
|
Base name of the created snapshot (and backup). This option is only
|
2015-09-24 14:56:22 +02:00
|
|
|
valid in the \fIsubvolume\fR section. Defaults to
|
2016-05-03 15:54:35 +02:00
|
|
|
\fI<subvolume\-name>\fR.
|
2015-09-03 18:02:19 +02:00
|
|
|
.RE
|
|
|
|
.PP
|
2016-04-13 14:47:38 +02:00
|
|
|
\fBsnapshot_create\fR always|onchange|ondemand|no
|
2015-09-03 18:02:19 +02:00
|
|
|
.RS 4
|
2016-04-13 14:47:38 +02:00
|
|
|
If set to \[lq]always\[rq], snapshots are always created. If set to
|
|
|
|
\[lq]onchange\[rq], snapshots are only created if the source subvolume
|
|
|
|
has changed since the last snapshot (more precisely: if the btrfs
|
|
|
|
generation has been increased since the last snapshot). If set to
|
|
|
|
\[lq]ondemand\[rq], snapshots are only created if the target subvolume
|
|
|
|
is reachable (useful if you are tight on disk space and you only need
|
|
|
|
btrbk for backups to an external disk which is not always
|
|
|
|
connected). If set to \[lq]no\[rq], the snapshots are never created
|
2016-04-12 19:43:12 +02:00
|
|
|
(useful if another instance of btrbk is taking care of snapshot
|
|
|
|
creation). Defaults to \[lq]always\[rq].
|
2015-09-03 18:02:19 +02:00
|
|
|
.RE
|
|
|
|
.PP
|
2015-04-18 20:18:11 +02:00
|
|
|
\fBincremental\fR yes|no|strict
|
2015-09-03 18:02:19 +02:00
|
|
|
.RS 4
|
2015-05-25 17:13:36 +02:00
|
|
|
If set, incremental backups are created. If set to \[lq]strict\[rq],
|
|
|
|
non-incremental (initial) backups are never created. Defaults to
|
|
|
|
\[lq]yes\[rq].
|
2015-09-03 18:02:19 +02:00
|
|
|
.RE
|
|
|
|
.PP
|
2016-04-14 14:15:12 +02:00
|
|
|
\fBsnapshot_preserve\fR no|<retention_policy>
|
2016-02-29 23:19:55 +01:00
|
|
|
.RS 4
|
2016-04-14 14:15:12 +02:00
|
|
|
Set retention policy for snapshots (see RETENTION POLICY below). If
|
|
|
|
set to \[lq]no\[rq], preserve snapshots according to
|
|
|
|
\fIsnapshot_preserve_min\fR only. Defaults to \[lq]no\[rq].
|
2016-02-29 23:19:55 +01:00
|
|
|
.RE
|
|
|
|
.PP
|
2016-04-12 20:35:57 +02:00
|
|
|
\fBsnapshot_preserve_min\fR all|latest|<number>{h,d,w,m,y}
|
2015-09-03 18:02:19 +02:00
|
|
|
.RS 4
|
2016-04-12 19:55:29 +02:00
|
|
|
Preserve all snapshots for a minimum amount of hours (h), days (d),
|
2016-04-12 11:47:28 +02:00
|
|
|
weeks (w), months (m) or years (y), regardless of how many there
|
2016-04-12 20:35:57 +02:00
|
|
|
are. If set to \[lq]all\[rq], preserve all snapshots forever. If set
|
2016-04-13 17:13:03 +02:00
|
|
|
to \[lq]latest\[rq], preserve latest snapshot. Defaults to
|
2016-04-19 21:07:04 +02:00
|
|
|
\[lq]all\[rq].
|
2015-09-03 18:02:19 +02:00
|
|
|
.RE
|
|
|
|
.PP
|
2016-04-14 14:15:12 +02:00
|
|
|
\fBtarget_preserve\fR no|<retention_policy>
|
2015-09-03 18:02:19 +02:00
|
|
|
.RS 4
|
2016-04-14 14:15:12 +02:00
|
|
|
Set retention policy for backups (see RETENTION POLICY below). If set
|
|
|
|
to \[lq]no\[rq], preserve backups according to
|
|
|
|
\fItarget_preserve_min\fR only. Defaults to \[lq]no\[rq].
|
2015-09-03 18:02:19 +02:00
|
|
|
.RE
|
|
|
|
.PP
|
2016-04-12 20:35:57 +02:00
|
|
|
\fBtarget_preserve_min\fR all|latest|no|<number>{h,d,w,m,y}
|
2015-09-03 18:02:19 +02:00
|
|
|
.RS 4
|
2016-04-12 19:55:29 +02:00
|
|
|
Preserve all backups for a minimum amount of hours (h), days (d),
|
2016-04-12 11:47:28 +02:00
|
|
|
weeks (w), months (m) or years (y), regardless of how many there
|
2016-04-12 20:35:57 +02:00
|
|
|
are. If set to \[lq]all\[rq], preserve all backups forever. If set to
|
|
|
|
\[lq]latest\[rq], always preserve the latest backup (useful in
|
|
|
|
conjunction with "target_preserve no", if you want to keep the latest
|
|
|
|
backup only). If set to \[lq]no\[rq], only the backups following the
|
2016-04-19 21:07:04 +02:00
|
|
|
\fItarget_preserve\fR policy are created. Defaults to \[lq]all\[rq].
|
2015-09-03 18:02:19 +02:00
|
|
|
.RE
|
|
|
|
.PP
|
2015-02-08 13:43:29 +01:00
|
|
|
\fBpreserve_day_of_week\fR monday|tuesday|...|sunday
|
2015-09-03 18:02:19 +02:00
|
|
|
.RS 4
|
2015-02-08 13:43:29 +01:00
|
|
|
Defines on what day a backup/snapshot is considered as a weekly
|
2015-05-20 13:50:18 +02:00
|
|
|
backup. Defaults to \[lq]sunday\[rq].
|
2015-09-03 18:02:19 +02:00
|
|
|
.RE
|
|
|
|
.PP
|
2016-05-03 15:54:35 +02:00
|
|
|
\fBgroup\fR <group\-name>[,<group\-name>]...
|
2015-09-20 17:47:46 +02:00
|
|
|
.RS 4
|
|
|
|
Add the current section (volume, subvolume or target) to a
|
|
|
|
user-defined group, which can be used as filter for several btrbk
|
|
|
|
commands.
|
|
|
|
.RE
|
|
|
|
.PP
|
2015-02-08 13:43:29 +01:00
|
|
|
\fBssh_identity\fR <file>
|
2015-09-03 18:02:19 +02:00
|
|
|
.RS 4
|
2015-02-08 13:43:29 +01:00
|
|
|
Absolute path to a ssh identity file (private key). Note that if the
|
|
|
|
private key is password protected, btrbk will prompt for user input,
|
|
|
|
which is usually not desired.
|
2015-09-03 18:02:19 +02:00
|
|
|
.RE
|
|
|
|
.PP
|
2015-02-08 13:43:29 +01:00
|
|
|
\fBssh_user\fR <username>
|
2015-09-03 18:02:19 +02:00
|
|
|
.RS 4
|
2016-05-03 15:54:35 +02:00
|
|
|
Remote username for ssh. Defaults to \[lq]root\[rq]. Note that you
|
|
|
|
will have to make sure that the remote user is able to run
|
|
|
|
"/sbin/btrfs" (which needs root privileges).
|
2015-09-03 18:02:19 +02:00
|
|
|
.RE
|
|
|
|
.PP
|
2015-08-13 21:39:07 +02:00
|
|
|
\fBssh_port\fR <port>
|
2015-09-03 18:02:19 +02:00
|
|
|
.RS 4
|
2015-08-13 21:39:07 +02:00
|
|
|
Port to connect to on the remote host. Defaults to \[lq]default\[rq]
|
|
|
|
(the port specified in \fIssh_config\fR, which defaults to 22).
|
2015-09-03 18:02:19 +02:00
|
|
|
.RE
|
|
|
|
.PP
|
2015-09-01 00:43:14 +02:00
|
|
|
\fBssh_compression\fR yes|no
|
2015-09-03 18:02:19 +02:00
|
|
|
.RS 4
|
2015-09-01 00:43:14 +02:00
|
|
|
Enables or disables the compression of ssh connections. Defaults to
|
|
|
|
\[lq]no\[rq].
|
2015-09-03 18:02:19 +02:00
|
|
|
.RE
|
|
|
|
.PP
|
2015-09-20 18:32:19 +02:00
|
|
|
\fBssh_cipher_spec\fR <cipher_spec>
|
|
|
|
.RS 4
|
|
|
|
Selects the cipher specification for encrypting the session
|
2016-05-03 15:54:35 +02:00
|
|
|
(comma-separated list of ciphers in order of preference). See the "\-c
|
2015-09-20 18:32:19 +02:00
|
|
|
cipher_spec" option in ssh(1) for more information. Defaults to
|
|
|
|
\[lq]default\[rq] (the ciphers specified in \fIssh_config\fR).
|
|
|
|
.RE
|
|
|
|
.PP
|
2016-03-23 11:58:23 +01:00
|
|
|
\fBrate_limit\fR <rate>|no
|
|
|
|
.RS 4
|
|
|
|
Limit the transfer to a maximum of \fI<rate>\fR bytes per second. A
|
|
|
|
suffix of "k", "m", "g", or "t" can be added to denote kilobytes
|
|
|
|
(*1024), megabytes, and so on. Defaults to \[lq]no\[rq].
|
|
|
|
.RE
|
|
|
|
.PP
|
2016-06-07 16:17:02 +02:00
|
|
|
\fBlockfile\fR <file>
|
|
|
|
.RS 4
|
|
|
|
Create lockfile <file> on startup; checks lockfile before running any
|
|
|
|
btrfs commands (using perl "flock"), and exits if the lock is held by
|
|
|
|
another btrbk instance. Ignored on dryrun (\fI\-n\fR,
|
|
|
|
\fI\-\-dry\-run\fR). See also \fI\-\-lockfile\fR command-line option.
|
|
|
|
.RE
|
|
|
|
.PP
|
2015-02-08 13:43:29 +01:00
|
|
|
\fBbtrfs_commit_delete\fR after|each|no
|
2015-09-03 18:02:19 +02:00
|
|
|
.RS 4
|
2015-02-08 13:43:29 +01:00
|
|
|
If set, make sure the deletion of snapshot and backup subvolumes are
|
2015-05-20 13:50:18 +02:00
|
|
|
committed to disk when btrbk terminates. Defaults to \[lq]no\[rq].
|
2015-09-03 18:02:19 +02:00
|
|
|
.RE
|
|
|
|
.PP
|
2015-02-08 13:43:29 +01:00
|
|
|
Lines that contain a hash character (#) in the first column are
|
|
|
|
treated as comments.
|
2016-04-12 11:47:28 +02:00
|
|
|
.SH RETENTION POLICY
|
2016-04-13 19:56:35 +02:00
|
|
|
btrbk uses separate retention policies for snapshots and backups,
|
|
|
|
which are defined by the \fIsnapshot_preserve_min\fR,
|
2016-04-12 19:55:29 +02:00
|
|
|
\fIsnapshot_preserve\fR, \fItarget_preserve_min\fR,
|
2016-04-12 11:47:28 +02:00
|
|
|
\fItarget_preserve\fR, and the \fIpreserve_day_of_week\fR
|
|
|
|
configuration options.
|
|
|
|
.PP
|
|
|
|
Within this section, any statement about "backups" is always valid for
|
|
|
|
backups as well as snapshots, referring to \fItarget_preserve\fR or
|
|
|
|
\fIsnapshot_preserve\fR respectively.
|
|
|
|
.PP
|
|
|
|
The format for \fI<retention_policy>\fR is:
|
|
|
|
.PP
|
|
|
|
.RS 4
|
|
|
|
[<hourly>h] [<daily>d] [<weekly>w] [<monthly>m] [<yearly>y]
|
|
|
|
.RE
|
|
|
|
.PP
|
|
|
|
With the following semantics:
|
|
|
|
.PP
|
|
|
|
.B hourly
|
|
|
|
.RS 4
|
|
|
|
Defines how many hours back hourly backups should be preserved. The
|
2016-04-11 19:54:56 +02:00
|
|
|
first backup of an hour is considered an hourly backup. Note that if
|
2016-04-12 11:47:28 +02:00
|
|
|
you use <hourly> scheduling, make sure to also set
|
2016-05-03 15:54:35 +02:00
|
|
|
\fItimestamp_format\fR to \[lq]long\[rq] or \[lq]long\-iso\[rq], or
|
|
|
|
the scheduler will interpret the time as "00:00" (midnight).
|
2016-04-12 11:47:28 +02:00
|
|
|
.RE
|
|
|
|
.PP
|
|
|
|
.B daily
|
|
|
|
.RS 4
|
|
|
|
Defines how many days back daily backups should be preserved. The
|
2016-04-11 19:54:56 +02:00
|
|
|
first backup of a day is considered a daily backup.
|
2016-04-12 11:47:28 +02:00
|
|
|
.RE
|
|
|
|
.PP
|
|
|
|
.B weekly
|
|
|
|
.RS 4
|
|
|
|
Defines how many weeks back weekly backups should be preserved. The
|
|
|
|
first daily backup created at \fIpreserve_day_of_week\fR (or the first
|
|
|
|
backup in this week if none was made on the exact day) is considered
|
|
|
|
as a weekly backup.
|
|
|
|
.RE
|
|
|
|
.PP
|
|
|
|
.B monthly
|
|
|
|
.RS 4
|
|
|
|
Defines how many months back monthly backups should be
|
2016-04-11 19:54:56 +02:00
|
|
|
preserved. Every first weekly backup in a month is considered a
|
2016-04-12 11:47:28 +02:00
|
|
|
monthly backup.
|
|
|
|
.RE
|
|
|
|
.PP
|
|
|
|
.B yearly
|
|
|
|
.RS 4
|
|
|
|
Defines for how many years back yearly backups should be
|
2016-04-11 19:54:56 +02:00
|
|
|
preserved. Every first monthly backup in a year is considered a yearly
|
2016-04-12 11:47:28 +02:00
|
|
|
backup.
|
|
|
|
.RE
|
|
|
|
.PP
|
|
|
|
Use an asterisk for \[lq]all\[rq] (e.g. "target_preserve 60d *m"
|
|
|
|
states: "preserve daily backups for 60 days back, and all monthly
|
|
|
|
backups").
|
2016-04-21 13:27:54 +02:00
|
|
|
.PP
|
|
|
|
The reference time (which defines the beginning of a day, week, month
|
|
|
|
or year) for all date/time calculations is the local time of the host
|
|
|
|
running btrbk.
|
|
|
|
.PP
|
|
|
|
Caveats:
|
|
|
|
.IP \[bu] 2
|
2016-04-23 14:37:24 +02:00
|
|
|
If you run a setup with several btrbk instances (e.g. one
|
|
|
|
snapshot-only instance per remote client, and a separate fetch-only
|
|
|
|
instance on the backup server), it makes perfectly sense to run btrbk
|
|
|
|
with different local time on the clients, in order to make sure the
|
|
|
|
backups from all the remote hosts are preserved for "midnight", and
|
|
|
|
not at "00:00 UTC" (which would be "14:00" in Honolulu). If you want
|
2016-05-03 15:54:35 +02:00
|
|
|
this behaviour, do NOT use "timestamp_format long\-iso".
|
2016-04-23 14:37:24 +02:00
|
|
|
.IP \[bu] 2
|
2016-05-03 15:54:35 +02:00
|
|
|
If "timestamp_format long\-iso" is set, running btrbk from different
|
2016-04-21 13:27:54 +02:00
|
|
|
time zones leads to different interpretation of "first in day, week,
|
2016-04-23 14:37:24 +02:00
|
|
|
month, or year". Make sure to run btrbk with the same time zone on
|
|
|
|
every host, e.g. by setting the TZ environment variable (see
|
|
|
|
tzset(3)).
|
2015-10-23 19:26:35 +02:00
|
|
|
.SH TARGET TYPES
|
|
|
|
.PP
|
2016-05-03 15:54:35 +02:00
|
|
|
\fBsend\-receive\fR
|
2015-10-23 19:26:35 +02:00
|
|
|
.RS 4
|
|
|
|
Backup to a btrfs filesystem, using "btrfs send/receive". This is the
|
2016-05-03 15:54:35 +02:00
|
|
|
recommended (standard) target type. The \fI<target\-directory>\fR must
|
2016-03-31 13:53:00 +02:00
|
|
|
be an absolute path and point to a btrfs volume (or subvolume), or to
|
2016-05-03 15:54:35 +02:00
|
|
|
a directory within a subvolume. See btrfs\-send(8), btrfs\-receive(8).
|
2015-10-23 19:26:35 +02:00
|
|
|
.RE
|
|
|
|
.PP
|
|
|
|
\fBraw\fR \fI*experimental*\fR
|
|
|
|
.RS 4
|
|
|
|
Backup to a raw (filesystem independent) file from the output of
|
2016-05-03 15:54:35 +02:00
|
|
|
btrfs\-send(8), with optional compression and encryption.
|
2015-10-23 19:26:35 +02:00
|
|
|
.PP
|
|
|
|
Note that the target preserve mechanism is currently disabled for raw
|
|
|
|
backups (btrbk does not delete any raw files)!
|
|
|
|
.PP
|
|
|
|
Additional options for raw targets:
|
|
|
|
.PP
|
|
|
|
.RS 4
|
|
|
|
raw_target_compress gzip|bzip2|xz|no
|
|
|
|
.PD 0
|
|
|
|
.PP
|
2016-01-14 18:02:53 +01:00
|
|
|
raw_target_compress_level default|<number>
|
|
|
|
.PP
|
|
|
|
raw_target_compress_threads default|<number>
|
|
|
|
.PP
|
2015-10-23 19:26:35 +02:00
|
|
|
raw_target_encrypt gpg|no
|
|
|
|
.PP
|
|
|
|
gpg_keyring <file>
|
|
|
|
.PP
|
|
|
|
gpg_recipient <name>
|
|
|
|
.RE
|
|
|
|
.PD
|
|
|
|
.PP
|
2016-05-03 15:30:06 +02:00
|
|
|
Raw targets get an extra file suffix in the format:
|
2015-10-23 19:26:35 +02:00
|
|
|
.RS 4
|
2016-05-03 15:30:06 +02:00
|
|
|
.PP
|
|
|
|
<received_uuid>[@<parent_uuid>].btrfs[.gz|.bz2|.xz][.gpg]
|
2015-10-23 19:26:35 +02:00
|
|
|
.RE
|
|
|
|
.PP
|
|
|
|
The <parent_uuid> is only set on \fIincremental\fR backups, and points
|
|
|
|
to the <received_uuid> of the previous backup in a incremental backup
|
2015-11-02 20:09:19 +01:00
|
|
|
chain.
|
|
|
|
.PP
|
|
|
|
For \fIincremental\fR backups ("incremental yes"), please note that:
|
|
|
|
.IP 1. 4
|
2015-10-23 19:26:35 +02:00
|
|
|
As soon as a single \fIincremental\fR backup file is lost or
|
|
|
|
corrupted, all later incremental backups become invalid, as there is
|
|
|
|
no common parent for the subsequent incremental images anymore. This
|
|
|
|
might be a good compromise for a vacation backup plan, but for the
|
|
|
|
long term make sure that a non-incremental backup is triggered from
|
|
|
|
time to time.
|
2015-11-02 20:09:19 +01:00
|
|
|
.IP 2. 4
|
2015-10-23 19:26:35 +02:00
|
|
|
There is currently no support for rotation of incremental backups: if
|
|
|
|
\fIincremental\fR is set, a full backup must be triggered manually
|
|
|
|
from time to time in order to be able to delete old backups.
|
|
|
|
.RE
|
2015-02-08 13:43:29 +01:00
|
|
|
.SH AVAILABILITY
|
2016-03-16 17:45:32 +01:00
|
|
|
Please refer to the btrbk project page \fBhttp://digint.ch/btrbk/\fR
|
|
|
|
for further details.
|
2015-02-08 13:43:29 +01:00
|
|
|
.SH SEE ALSO
|
|
|
|
.BR btrbk (1)
|
|
|
|
.SH AUTHOR
|
|
|
|
Axel Burri <axel@tty0.ch>
|