aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2012-05-30 13:41:09 +0300
committerSergey Poznyakoff <gray@gnu.org.ua>2012-05-30 13:43:25 +0300
commitfbea83e22332724c7bff2f0a67dde810476f004b (patch)
treebebc165d9f6876cf156580d71c1a990e800cfb7a /doc
parentd669127d2efaf9969b081fbaff47ff8938388750 (diff)
downloadbeam-fbea83e22332724c7bff2f0a67dde810476f004b.tar.gz
beam-fbea83e22332724c7bff2f0a67dde810476f004b.tar.bz2
Implement mail notification.
* backup.in (backup): New function. Send mail notification if backup_notify_email is not empty. * lib/beam/common.in (mail_report): New function. * beam.conf: Provide examples for the new variables. * beam.in: Fix typos. * doc/beam.conf.5in: Document new variables.
Diffstat (limited to 'doc')
-rw-r--r--doc/beam.conf.5in114
1 files changed, 114 insertions, 0 deletions
diff --git a/doc/beam.conf.5in b/doc/beam.conf.5in
index cf196e9..17d116b 100644
--- a/doc/beam.conf.5in
+++ b/doc/beam.conf.5in
@@ -217,6 +217,110 @@ The following variables must be defined for items of this type:
.TP
.B \fIitem\fB_database
The database name.
+.SH MYSQL BACKUP TYPE
+The
+.B mysql
+backup type creates a dump of a MySQL database and archives it witj
+.BR tar (1).
+The database to dump and access credentials are specified using the
+following variables:
+.TP
+.B \fIitem\fR_database
+The database name.
+.TP
+.B \fIitem\fR_defaults_file
+A full pathname of the MySQL defaults file containing credenitals 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 MAIL NOTIFICATION
+Apart from usual logging, backup reports can be sent via email to
+selected recipients. To enable this feature, the variable
+.B backup_notify_email
+must be defined to a comma-separated list of recipient email
+addresses.
+.PP
+A number of variables is provided to customize the email headers and
+contents.
+.TP
+.B backup_notify_email
+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
+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
+on which the backup is run.
+
+If set, this variable must contain a single email address, without
+personal part or comments, e.g.
+.sp
+.nf
+.in +2
+backup_sender_email=root@example.com
+.in
+.fi
+.sp
+.TP
+.B backup_sender_personal
+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
+to form a valid RFC-2822
+.B From
+header. For example, if you have:
+.sp
+.nf
+.in +2
+backup_sender_email=root@example.com
+backup_sender_personal="Automatic backup report"
+.in
+.fi
+.sp
+then the resulting report will contain:
+.sp
+.nf
+.in +2
+From: "Automatic backup report" <root@example.com>
+.in
+.fi
+.sp
+.TP
+.B backup_report_headers
+Defines additional headers for the report message. By default, the
+following headers are generated:
+.BR From ,
+.BR To ,
+.BR Subject ,
+.BR X-Beam-Items ,
+.BR X-Beam-Round ,
+and
+.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
+Sets the introductory text to be displayed before the actual report.
+.TP
+.B backup_report_signature
+Sets the signature text, which will be output after the report body.
+.TP
+.B backup_mailer_program
+Defines the mailer program. The default is
+.sp
+.nf
+.in +2
+/usr/sbin/sendmail -oi -t -F $backup_sender_email
+.in
+.fi
+.sp
.SH HOOKS
Two special variables, called hooks, allow you to supply arbitrary
procedures to be run before and after backup.
@@ -261,6 +365,16 @@ dbdump_database=savane
system_type=fs
system_dir="/"
system_files="etc home"
+
+# Notify root about the results.
+backup_notify_email=root@example.com
+backup_sender_email=devnull@example.com
+backup_sender_personal="Automatic daily backup"
+backup_report_intro="Today's daily backup produced the following
+results."
+backup_report_signature="\-\-
+Best regards,
+Beam Automatic Backup"
.in
.fi
.sp

Return to:

Send suggestions and report system problems to the System administrator.