From 46a0a4faafa5d7273ee4a46e377add9da774c3f3 Mon Sep 17 00:00:00 2001 From: Norbert Varzariu Date: Fri, 22 Jan 2016 15:44:12 +0100 Subject: [PATCH] update README --- README.md | 37 +++++++++++++++++++++++++------------ manifests/config.pp | 2 +- 2 files changed, 26 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 2694397..bed29f7 100644 --- a/README.md +++ b/README.md @@ -133,10 +133,14 @@ rsnapshot::hosts: backup: '/var': './var' cron: - 'daily': - 'minute': '0-10' - 'hour': '1..5' - + mailto: 'bar1@example.com' + daily: + minute: '0-10' + hour: '1..5' + db1: + backup_scripts: + mysql: + misc: ``` @@ -281,10 +285,18 @@ rsnapshot::hosts: hour: [ '20..23','0..2' ] weekly: hour: [ '20..23','0..2' ] + webhost: + + customervm.provider.com: + backup_user: 'customer' ``` -Mails for webhost will go to admin@example.com (from the global override), those for webserver will go to support@example.com. +`webhost`: Mails will go to `admin@example.com` (from the global override). + +`webserver`: Mails will go to `support@example.com`. + +`customervm.provider.com`: The backup (and thus ssh) user will be `customer@customervm.provider.com` @@ -380,11 +392,11 @@ Default is: #### `$backup_scripts` Additional scripts to create, possible values are: mysql, psql, misc -mysql: used for mysql backups +`mysql`: used for mysql backups -psql: used for postgresql backups +`psql`: used for postgresql backups -misc: custom commands to run on the node +`misc`: custom commands to run on the node You can set @@ -392,13 +404,13 @@ You can set `$dbbackup_password`: password for the backup user -`$dumper`: path to the dump bin you wish to use +`$dumper`: path to the dump bin you wish to use -`$dump_flags`: flags for your dump bin +`$dump_flags`: flags for your dump bin -`$ignore_dbs`: databases to be ignored (the psql script ignores template and postgres databases by default) +`$ignore_dbs`: databases to be ignored (the psql script ignores template and postgres databases by default) -`$commands`: array of commands to run on the host (this has no effect on psql and mysql scripts and is intended for your custom needs, see misc script section) +`$commands`: array of commands to run on the host (this has no effect on psql and mysql scripts and is intended for your custom needs, see misc script section) See below for defaults @@ -436,6 +448,7 @@ Default is: ], default => [], }, + } } ``` diff --git a/manifests/config.pp b/manifests/config.pp index d04b941..9878cc4 100644 --- a/manifests/config.pp +++ b/manifests/config.pp @@ -36,7 +36,7 @@ class rsnapshot::config ( $hosts_clean = assert_empty_hash($hosts) $hosts_clean.each |String $host, $hash | { - $backup_user = pick($hash['backup_user'], $rsnapshot::params::config_backup_user) + $backup_user = pick($hash['backup_user'], $rsnapshot::backup_user, $rsnapshot::params::config_backup_user, 'root') $default_backup_dirs = pick($rsnapshot::default_backup, $rsnapshot::params::config_default_backup) $backup_levels = pick($hash['backup_levels'], $rsnapshot::backup_levels, 'weekly') $backup = $hash['backup']