puppet-rsnapshot is a rsnapshot puppet module published on the puppet forge under the name loic/rsnapshot. It is based on the following assumptions:
- All machines have rsync over ssh
- All backups consist of the entire file system of the machine
- It takes less than two hours to backup all machines
A ssh key is created on the puppet master ( by the rsnapshot::puppetmaster class ) and installed in the root authorized_keys file of each machines to be backuped ( by the rsnapshot::client class ). The machine running rsnapshot has one configuration file per client ( generated by the rsnapshot::server class ). It runs each backup in sequence, starting in the middle of the night. The health of the backups can be monitored by nagios using a nagios plugin ( installed by the rsnapshot::nagios class ).
Usage
puppet-rsnapshot is a puppet module that should be installed in the puppet master as follows
git clone http://redmine.the.re/git/puppet-rsnapshot.git /etc/puppet/modules/rsnapshot
or
puppet module install loic/rsnapshot
Here is an example usage of the module extracted from a manifest:
node 'bm0001.the.re' {
class { 'rsnapshot::puppetmaster': }
class { 'rsnapshot::client':
excludes => [ '/var/lib/glance',
'/var/lib/nova',
'/media/turnkey', ]
}
}
node 'rsnapshot.novalocal' {
class { 'rsnapshot::server':
ip => "5.9.88.172,${::ipaddress}",
}
}
node 'jenkins.novalocal', 'redmine.novalocal', 'there.novalocal' {
class { 'rsnapshot::client':
ip => $::ipaddress,
}
}
node 'debian.novalocal' {
class { 'rsnapshot::client':
ip => $::ipaddress,
excludes => [ '/media/debian' ],
}
}
node 'nagios.novalocal' {
class { 'rsnapshot::nagios: }
}
For a detailed explanation of each class, check the documentation