This cookbook configures backup using the rdiff-backup backup tool.
Put a ssh private key into files/default/#{node['rdiff-backup']['key']}
and the
corresponding public one into files/default/#{node['rdiff-backup']['key']}.pub
.
This key will be used for the rdiff-backup
user that runs the backups.
- ssh_known_hosts
- sudo
Key | Type | Description | Default |
---|---|---|---|
['rdiff-backup']['backup_dir'] | String | where to put the backup files | /backup |
['rdiff-backup']['etc_dir'] | String | where to put the rdiff-backup config files | /etc/rdiff-backup |
['rdiff-backup']['user'] | Boolean | the user to run the backup task as | rdiff-backup |
['rdiff-backup']['key'] | String | the ssh key file name | id_rsa |
['rdiff-backup']['cron']['enable'] | Boolean | whether to setup a cron job for automated backups | true |
['rdiff-backup']['cron']['email'] | String | where to send summary emails | nil |
['rdiff-backup']['cron']['lockfile'] | String | where to write the cron job lockfile | /tmp/rdiff-backup.lock |
['rdiff-backup']['cron']['day'] | String | `day` component of the cron job definition | * |
['rdiff-backup']['cron']['hour'] | String | `hour` component of the cron job definition | * |
['rdiff-backup']['cron']['minute'] | String | `minute` component of the cron job definition | * |
['rdiff-backup']['cron']['month'] | String | `month` component of the cron job definition | * |
['rdiff-backup']['cron']['weekday'] | String | `weekday` component of the cron job definition | * |
['rdiff-backup']['autotrim']['enable'] | Boolean | whether to auto trim backups | true |
['rdiff-backup']['autotrim']['timespan'] | String | backup retention timespan (in rdiff-backup format) | 1y |
Adds a path to the backup directory list.
Used in the other recipes. Do not call directly.
Sets up the client (= host to be backed up) side.
Sets up the server (= host to save backups to) side.
This will do things: if enabled, a cron job is created that backs up all configured rdiff-backup clients, and scripts to run on demand backups of each single client.
###definitions
backup_path "/var/lib/mailman"
Adds the mailman home directory to be backed up.
You can put shell scripts into #{node['rdiff-backup']['etc_dir']}/pre.d
and
#{node['rdiff-backup']['etc_dir']}/post.d
folders to be run before and after
the backup itself respectively.
- Fork the repository on Github
- Create a named feature branch (like
add_component_x
) - Write you change
- Write tests for your change (if applicable)
- Run the tests, ensuring they all pass
- Submit a Pull Request using Github
Authors: ka’imi [email protected]