rsnapshot
Version information
This version is compatible with:
- ,
Start using this module
Add this module to your Puppetfile:
mod 'ivaldi-rsnapshot', '0.3.1'
Learn more about managing modules with a PuppetfileDocumentation
#rsnapshot
##Overview The rsnapshot module allows you to setup an rsnapshot backup master and rsnapshot backup nodes. Each node is automatically added to the master and backuped using a cronjob on the master.
##Setup
###Installing a rsnapshot master server
To setup a rsnapshot master server with location name dc1
, add the following lines to its puppet configuration.
class { 'rsnapshot::master':
location_name => 'dc1',
exclusions => ['var/spool'],
}
This will install rsnapshot, generate a ssh key pair and setup cronjobs to run rsnapshot as root.
###Adding rsnapshot nodes For every server that needs to be backed up to the previously configures rsnapshot master, add the following lines.
class { 'rsnapshot::node':
to_location => 'dc1',
}
This will add the ssh public key of the rsnapshot master with location_name
dc1
to the authorized_keys
file of root, allowing rsnapshot to login from the master server. On the rsnapshot master, this will add a line to /etc/rsnapshot.conf
to backup this node.
###Increasing security Optionally you might want to use a special backup user so you can disable root to login via ssh, this can be done by using the following syntax.
class { 'rsnapshot::node':
to_location => 'dc1',
user => 'rsnapshot',
}
This will create the user rsnapshot on the node, give it permission to run sudo rsync and add the public key of the rsnapshot master with location_name
dc1
to the authorized_keys
file of root, allowing rsnapshot to login from the master server as this new rsnapshot user.
Dependencies
- puppetlabs/stdlib (>= 3.2.0)
Copyright (c) 2014, Ivaldi All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.