1
0
mirror of https://github.com/krislamo/puppet-rsnapshot synced 2024-11-10 00:00:35 +00:00

fix README.md

This commit is contained in:
Norbert Varzariu 2016-01-05 15:28:06 +01:00
parent 80ef1f5806
commit 7f0b5cc4a9

View File

@ -149,6 +149,7 @@ You may specify time ranges as follows:
* default cron syntax (1-10, '*/5', 5) * default cron syntax (1-10, '*/5', 5)
* an array with allowed values, for example, if you want the backup for a host to run between 1am and 5am, you would override the hours setting for the host in question. * an array with allowed values, for example, if you want the backup for a host to run between 1am and 5am, you would override the hours setting for the host in question.
in hiera this would look like: (Explanation see below) in hiera this would look like: (Explanation see below)
```yaml ```yaml
rsnapshot::hosts: rsnapshot::hosts:
example.com: example.com:
@ -157,15 +158,20 @@ rsnapshot::hosts:
'minute': '1' 'minute': '1'
'hour': '1..5' 'hour': '1..5'
``` ```
This will create the rsnapshot config using defaults from params.pp, but set the minute of the daily backup to '1' and the hour to something random between 1 and 5. This will create the rsnapshot config using defaults from params.pp, but set the minute of the daily backup to '1' and the hour to something random between 1 and 5.
So it would look something like: So it would look something like:
``` ```
1 4 * * * foo daily 1 4 * * * foo daily
``` ```
or maybe or maybe
``` ```
1 2 * * * foo daily 1 2 * * * foo daily
``` ```
## Reference ## Reference
### Classes ### Classes
@ -220,6 +226,7 @@ Boolean. Backup default backup dirs or not.
#### `$default_backup` #### `$default_backup`
The default backup directories. This will apply to all hosts unless you set [backup_defaults](#backup_defaults) = false The default backup directories. This will apply to all hosts unless you set [backup_defaults](#backup_defaults) = false
Default is: Default is:
```puppet ```puppet
$default_backup = { $default_backup = {
'/etc' => './', '/etc' => './',
@ -232,6 +239,7 @@ Hash. Set time ranges for different backup levels. Each item (minute, hour...) a
The range notation is '$start..$end', so to pick a random hour from 8 pm to 2 am, you could set the hour of your desired backup level to The range notation is '$start..$end', so to pick a random hour from 8 pm to 2 am, you could set the hour of your desired backup level to
`[ '20..23','0..2' ]` `[ '20..23','0..2' ]`
Example: Example:
```puppet ```puppet
$cron = { $cron = {
hourly => { hourly => {
@ -240,8 +248,10 @@ Example:
} }
} }
``` ```
Or in hiera: Or in hiera:
- global override - global override
```yaml ```yaml
rsnapshot::cron: rsnapshot::cron:
daily: daily:
@ -249,7 +259,9 @@ rsnapshot::cron:
weekly: weekly:
minute: '20' minute: '20'
``` ```
- per host override - per host override
```yaml ```yaml
rsnapshot::hosts: rsnapshot::hosts:
webserver: webserver:
@ -275,6 +287,7 @@ $cron =>{
} }
``` ```
Default is: Default is:
```puppet ```puppet