项目作者: tohuwabohu

项目描述 :
Puppet module to backup and restore MySQL databases based on duplicity.
高级语言: Puppet
项目地址: git://github.com/tohuwabohu/puppet-duplicity_mysql.git
创建时间: 2014-05-31T01:08:14Z
项目社区:https://github.com/tohuwabohu/puppet-duplicity_mysql

开源协议:Apache License 2.0

下载


duplicity_mysql

Overview

Backup and restore MySQL databases based on duplicity. The modules makes sure a database dump is include in the
referenced duplicity backup and restores this previously taken dump in case the existing database is empty.

Usage

Make sure, the parent backup directory (/var/backups) is properly existing:

  1. file { '/var/backups':
  2. ensure => directory,
  3. owner => 'root',
  4. group => 'root',
  5. mode => '0644',
  6. }

Now you’re ready to manage a database:

  1. duplicity_mysql::database { 'my-database':
  2. profile => 'system',
  3. }

This will create a dump of the MySQL database my-database each time the backup profile system is run. The dump will
be keep in the default backup directory. If the database is existing but empty, the dump will be restored. In case the
dump file is missing, Puppet will attempt to restore the file from the last backup.

If you just want to backup the database but don’t restore it, set the ensure parameter to backup:

  1. duplicity_mysql::database { 'my-database':
  2. ensure => backup,
  3. profile => 'system',
  4. }

Limitations

The module has been tested on the following operating systems. Testing and patches for other platforms are welcome.

  • Debian Linux 6.0 (Squeeze)

Build Status

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request