file backup script management
This module manages include/excludes for a file backup script using tar
- backup script installation (managed using tarbackup)
- backup configuration files (managed using tarbackup::instance)
- backup cronjobs (managed using tarbackup::instance)
This module requires pluginsync enabled
basic example:
class { 'tarbackup':
}
tarbackup::instance { 'coses':
includedir => '/etc',
includedir => '/etc/apache2',
xdev => true,
destination => '/backup/tarbackup',
}
This will create the following files:
- /usr/local/bin/tarbackup.sh
- /usr/local/bin/tarbackup_coses.config
And add the following cronjob:
# Puppet Name: cronjob tarball backup tarbackup
0 2 * * * /usr/local/bin/tarbackup.sh /usr/local/bin/tarbackup_coses.config
Put the classes, types, and resources for customizing, configuring, and doing the fancy stuff with your module here.
installs backup script
- basedir: where to install this script (default: /usr/local/bin)
- backupscript: script name (default: tarbackup)
adds a cronjob por a given set of files to backup
- includedir:
- destination:
- instancename: (default: resource's name)
- backupname: (default: Files)
- excludedir: (default: undef)
- retention: (default: undef)
- logdir: (default: undef)
- mailto: (default: undef)
- idhost: (default: undef)
- hour: (default: 2)
- minute: (default: 0)
- month: (default: undef)
- monthday: (default: undef)
- weekday: (default: undef)
- setcron: (default: true)
- xdev: (default: false)
Tested on:
- CentOS 6
- CentOS 7
- Ubuntu 16.04
but should work anywhere where there is a /bin/bash installed
We are pushing to have acceptance testing in place, so any new feature should have some test to check both presence and absence of any feature
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Added some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request