aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/beam.conf.5in183
1 files changed, 129 insertions, 54 deletions
diff --git a/doc/beam.conf.5in b/doc/beam.conf.5in
index 9aa571c..8cad913 100644
--- a/doc/beam.conf.5in
+++ b/doc/beam.conf.5in
@@ -19,9 +19,9 @@
beam.conf \- configuration file for
.B backup becomes easy
.SH DESCRIPTION
-The \fBbeam.conf\fR configuration file defines what files are to be
-included in the backup, what backup methods to use and where to store
-the resulting archives. The
+The \fBbeam.conf\fR file defines what data are to be included in the
+backup, what backup methods to use and where to store the resulting
+archives. The
.BR backup (1)
and
.BR restore (1)
@@ -30,17 +30,39 @@ utilities expect to find it in the
directory.
.SH SYNTAX
The file is essentially a shell script that defines variables
-controlling backup and restore procedures. The names of the variables
+controlling backup and restore procedures. Names of the variables
used by the backup scripts begin with
.BR backup_ .
.SH GENERAL SETUP
.TP
-.B backup_logfile
+.BR backup_logfile = \fIFILE\fR
If set, redirect standard error and standard output to that file. The
file will be created if it does not exist. Otherwise, the output will be
appended to it.
+
+By default, this file will be automatically rotated. See
+.B openlog_hook
+below for a discussion of this.
.TP
-.B backup_rsh_command
+.BR backup_logrotate_conf = \fITEXT\fR
+Configuration text for
+.BR logrotate (8),
+used to rotate the logfile. The default corresponds to:
+.sp
+.nf
+.in +2
+backup_logrotate_conf = "
+ weekly
+ rotate 4"
+.in
+.fi
+.sp
+Note, that no block statements are allowed within
+.BR backup_logrotate_conf ,
+because its entire contents will be placed within an appropriate block
+statement.
+.TP
+.BR backup_rsh_command = \fICOMMAND\fR
Use this command to access remote archives. Unless set, the backup
utilities will first look for an executable file named
.BR @BINDIR@/speedssh .
@@ -48,7 +70,7 @@ If not found, they will fall back to using \fB/usr/bin/ssh\fR. It is
the responsibility of the administrator to provide for authentication
on the remote system, e.g. by using shared-key authentication.
.TP
-.B backup_retain_interval
+.BR backup_retain_interval = \fINUMBER\fR
Sets the interval, in weeks, during which old backups and snapshots
are retained. Empty value or zero means never delete the backups.
@@ -64,7 +86,7 @@ bucket you will need the
.BR s3backer (1)
utility.
.TP
-.B backup_s3backer_options
+.BR backup_s3backer_options = \fILIST\fR
Additional options for
.BR s3backer (1).
@@ -72,18 +94,18 @@ Use it, e.g., to pass the
.B \-\-vhost
option if your bucket is located outside of the US region.
.TP
-.B backup_bucket_name
+.BR backup_bucket_name = \fISTRING\fR
Sets the name of the
.B s3
bucket to keep the archives in.
.TP
-.B backup_mp_s3backer
+.BR backup_mp_s3backer = \fIDIR\fR
Defines mount point for the "raw" bucket.
Default value is
.BR /mnt/s3backer .
.TP
-.B backup_mp_s3
+.BR backup_mp_s3 = \fIDIR\fR
Defines mount point for the actual s3-backed filesystem.
Default value is
@@ -92,15 +114,15 @@ Default value is
Tar setup variables control additional options and arguments passed to
.BR tar (1).
.TP
-.B backup_tar_options
+.BR backup_tar_options = \fILIST\fR
Use this variable to pass additional options to tar. Do not place tar
operation switches (such as \fB-c\fR, \fB-t\fR, etc.) here! These
will be added automatically by appropriate scripts, depending on the
-operation being performed
+operation being performed.
By default this variable is empty (no additional options passed to tar).
.TP
-.B backup_suffix
+.BR backup_suffix = \fISTRING\fR
This variable supplies suffix for created archive names. The default
is
.B tar .
@@ -117,7 +139,7 @@ backup_suffix="tar.bz2"
.fi
.sp
.TP
-.B backup_archive_dir
+.BR backup_archive_dir = \fIDIR\fR
Directory where archive files are located. It's OK to specify
a remote directory here, e.g.
.sp
@@ -129,14 +151,23 @@ backup_archive_dir="10.10.0.1:/export/backup"
.sp
This variable must be defined and whatever directory it points to must
already exist.
+
+If it is not defined and
+.B backup_bucket_name
+is set, indicating that the
+.B S3
+storage is used for backups,
+.B backup_archive_dir
+will be set automatically to the same value as
+.BR backup_mp_s3 .
.TP
-.B backup_snapshot_dir
+.BR backup_snapshot_dir = \fIDIR\fR
Directory for incremental snapshot files. These files are be named after
their archive counterparts, by appending the
.B .db
suffix.
.TP
-.B backup_verbose
+.BR backup_verbose = \fIN\fR
Set this variable to any non-empty value to request additional
verbosity. The effect of this setting depends on backup methods being
used. For example, the
@@ -152,49 +183,55 @@ identifies information that needs to be backed up. Syntactically,
items follow the same rules as shell variable names. Backup items
are introduced using the following variable:
.TP
-.B backup_items
+.BR backup_items = \fILIST\fR
A whitespace-separated list of backup items.
.PP
For each backup item
-.B name
+.I name
the configuration file must provide a set of variables describing
where to obtain this information and how to store it to the archive.
These variables follow the same naming convention:
.sp
.nf
.in +2
-\fBname\fR_\fBvar\fR
+\fIname\fR_\fBvar\fR
.in
.fi
.sp
-where \fBname\fR is the item name and \fIvar\fR is a valid shell
+where \fIname\fR is the item name and \fBvar\fR is a valid shell
identifier.
-The
-.B \fBname\fR_type
-variable must always be defined. It identifies the backup method
-to be applied to that item. Currently two backup methods are
-implemented:
+The \fIname\fR_\fBtype\fR variable must always be defined. It
+identifies the backup method to be applied to that item. The
+following backup methods are implemented:
.TP
.B fs
A file system backup.
.TP
.B postgres
-Backup of a PostgreSQL database.
+Backup of PostgreSQL databases.
+.TP
+.B mysql
+Backup of MySQL databases.
+.TP
+.B ldap
+Backup of LDAP databases.
.SH FS BACKUP TYPE
-This is the basic backup type, which means incremental backups of a
+This is the basic backup type. It creates incremental backups of a
specified file system. For each item of this type, the following
variables must be defined:
.TP
-.B \fIitem\fB_dir
+.BR \fIitem\fB_dir = \fIPATH\fR
The absolute path to the file system being backed up.
.TP
-.B \fIitem\fB_files
+.BR \fIitem\fB_files = \fILIST\fR
A whitespace-separated list of directories and/or files in the
.B \fIitem\fB_dir
directory.
+.PP
+The following variables are optional:
.TP
-.B \fIitem\fB_exclude
+.BR \fIitem\fB_exclude = \fILIST\fR
A whitespace-separated list of file names (or
.BR glob (3)
patterns) to exclude from archivation. This is translated to
@@ -212,13 +249,13 @@ system_exclude="'var/spool/mail/*'"
.fi
.sp
.TP
-.B \fIitem\fB_exclude_from
+.BR \fIitem\fB_exclude_from = \fILIST\fR
A list of files to read exclusion patterns from. It is translated
into a list of
.B \-\-exclude\-from
options.
.TP
-.B \fIitem\fB_tar_options
+.BR \fIitem\fB_tar_options = \fILIST\fR
A list of additional options to pass to tar. Use this with caution.
.PP
For example:
@@ -242,27 +279,64 @@ type creates a dump of a PostgreSQL database and archives it using
.BR tar (1).
The following variables must be defined for items of this type:
.TP
-.B \fIitem\fB_database
+.BR \fIitem\fB_database = \fISTRING\fR
The database name.
.SH MYSQL BACKUP TYPE
The
.B mysql
-backup type creates a dump of a MySQL database and archives it witj
+backup type creates a dump of a MySQL database and archives it with
.BR tar (1).
The database to dump and access credentials are specified using the
following variables:
.TP
-.B \fIitem\fR_database
-The database name.
+.BR \fIitem\fB_database = \fISTRING\fR
+The database name. If this variable is empty, all databases will be
+dumped.
.TP
-.B \fIitem\fR_defaults_file
-A full pathname of the MySQL defaults file containing credenitals for
+.BR \fIitem\fB_defaults_file = \fIFILE\fR
+A full pathname of the MySQL defaults file which contains credentials for
accessing this database. This file must have at least the
.B mysqldump
and
.B mysql
sections, the former being used when dumping the database and the
latter when restoring it.
+.SH LDAP BACKUP TYPE
+A LDAP database is introduced with the
+.B ldap
+backup type. The following keywords specify what to backup:
+.TP
+.BR \fIitem\fB_database_directory = \fIDIR\fR
+Specifies the pathname of a directory that contains the database
+files. This is used at restore time to clean up old database contents
+prior to restoring it.
+.TP
+.BR \fIitem\fB_database_number = \fINUMBER\fR
+Number of the database to dump, if your LDAP configuration contains
+several databases. If absent, all databases will be dumped. This
+keyword cannot be used in conjunction with
+.B \fIitem\fB_database_suffix
+(see below).
+.TP
+.BR \fIitem\fB_database_suffix = \fISTRING\fR
+Use the specified suffix to determine which database to operate upon.
+.TP
+.BR \fIitem\fB_uri = \fIURI\fR
+Use dn, scope and filter from the supplied argument URI to handle
+only matching entries.
+.TP
+.BR \fIitem\fB_user = \fINAME\fR
+Restore the database with the privileges of this user.
+.TP
+.BR \fIitem\fB_slapcat_options = \fILIST\fR
+A list of additional options for
+.BR slapcat (8C).
+Use with caution.
+.TP
+.BR \fIitem\fB_slapadd_options = \fILIST\fR
+A list of additional options to pass to
+.BR slapadd (8C)
+when restoring from the backup.
.SH MAIL NOTIFICATION
Apart from usual logging, backup reports can be sent via email to
selected recipients. To enable this feature, the variable
@@ -273,11 +347,11 @@ addresses.
A number of variables is provided to customize the email headers and
contents.
.TP
-.B backup_notify_email
+.BR backup_notify_email = \fILIST\fR
Sets a list of emails to receive backup report. Multiple emails must
be separated with commas. If not set, no notification will be sent.
.TP
-.B backup_sender_email
+.BR backup_sender_email = \fIEMAIL\fR
Defines the sender email address. Backup reports will appear to be
sent from this address. The default value is
\fBroot\fR@\fIhostname\fR, when \fIhostname\fR is the name of the host
@@ -293,7 +367,7 @@ backup_sender_email=root@example.com
.fi
.sp
.TP
-.B backup_sender_personal
+.BR backup_sender_personal = \fISTRING\fR
Defines personal part of the sender email. The personal part will be
enclosed in double quotes and prepended to the value of
.B backup_sender_email
@@ -317,7 +391,7 @@ From: "Automatic backup report" <root@example.com>
.fi
.sp
.TP
-.B backup_report_headers
+.BR backup_report_headers = \fILIST\fR
Defines additional headers for the report message. By default, the
following headers are generated:
.BR From ,
@@ -326,21 +400,22 @@ following headers are generated:
.BR X-Beam-Items ,
.BR X-Beam-Round ,
and
-.BR X-Beam-Level . The three \fBX-\fR headers contain the backed up
+.BR X-Beam-Level .
+The three \fBX-\fR headers contain the backed up
items (as set in the
.B backup_items
variable), backup round and backup level numbers, correspondingly.
To supply multiple headers, delimit them with single newline characters.
.TP
-.B backup_report_intro
+.BR backup_report_intro = \fITEXT\fR
Sets the introductory text to be displayed before the actual report.
.TP
-.B backup_report_signature
+.BR backup_report_signature = \fITEXT\fR
Sets the signature text, which will be output after the report body.
.TP
-.B backup_mailer_program
-Defines the mailer program. The default is
+.BR backup_mailer_program = \fICOMMAND\fR
+Defines the mailer program and its arguments. The default is
.sp
.nf
.in +2
@@ -349,10 +424,10 @@ Defines the mailer program. The default is
.fi
.sp
.SH HOOKS
-Two special variables, called hooks, allow you to supply arbitrary
-commands to be run before and after backup.
+Special variables, called hooks, allow you to supply arbitrary
+commands to be run at particular stages of the backup or restore process.
.TP
-.B openlog_hook
+.BR openlog_hook = \fILIST\fR
Commands listed in this variable are run before opening the logfile. The
most common use for this hook is to rotate an oversized logfile prior to
opening it.
@@ -365,16 +440,16 @@ to manage the log file. Configuration for
.BR logrotate (8)
can be supplied in the
.B backup_logrotate_conf
-variable. By default, the log file is rotated weekly, 4
+variable. By default, the log file is rotated weekly and 4
weeks worth of backlogs are preserved.
.TP
-.B prologue_hook
+.BR prologue_hook = \fILIST\fR
This variable contains a whitespace-separated list of commands to
be invoked before starting backup (or restore). These commands are
started in order of their appearance in the list and are called
without arguments. By default, this variable is empty.
.TP
-.B epilogue_hook
+.BR epilogue_hook = \fILIST\fR
This variable contains a whitespace-separated list of commands to
be invoked after the backup (or restore) has finished. These commands are
started in order of their appearance in the list and are called

Return to:

Send suggestions and report system problems to the System administrator.