Forge Home

automysqlbackup

Deploy automysqlbackup via Puppet

22,976 downloads

18,347 latest version

4.5 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Support the Puppet Community by contributing to this module

You are welcome to contribute to this module by suggesting new features, currency updates, or fixes. Every contribution is valuable to help ensure that the module remains compatible with the latest Puppet versions and continues to meet community needs. Complete the following steps:

  1. Review the module’s contribution guidelines and any licenses. Ensure that your planned contribution aligns with the author’s standards and any legal requirements.
  2. Fork the repository on GitHub, make changes on a branch of your fork, and submit a pull request. The pull request must clearly document your proposed change.

For questions about updating the module, contact the module’s author.

Version information

  • 0.2.4 (latest)
  • 0.2.3
  • 0.2.2
  • 0.2.1
  • 0.1.3
  • 0.1.2
  • 0.1.1
  • 0.1.0
  • 0.0.1
released Oct 11th 2014
This version is compatible with:
  • , ,

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'nextrevision-automysqlbackup', '0.2.4'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add nextrevision-automysqlbackup
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install nextrevision-automysqlbackup --version 0.2.4

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.

Download

Documentation

nextrevision/automysqlbackup — version 0.2.4 Oct 11th 2014

AutoMySQLBackup Module for Puppet

Build Status

####Table of Contents

  1. Upgrade Notice
  2. Intro
  3. Compatibility
  4. Variable Names
  5. Supercedence
  6. Usage
  7. Running the script manually
  8. Support or Contribute
  9. Contributors

Upgrade Notice

If upgrading from 0.1.X to 0.2.X, please see the compatibility section below.

0.2.3 fixed a naming issue in the cron script. To avoid duplicate cron jobs, it will remove and $name.automysqlbackup in favor of $name-automysqlbackup in /etc/cron.daily/.

There was also an issue in 0.2.1 (previous release) with installing from Forge. This was fixed as of 0.2.2 and the manifests have been correctly populated.

Intro

Before using this module, it is highly recommended that you consult the automysqlbackup developer documentation in order to comprehend what each option performs. It is included within this module and is certainly worth getting familiar with.

Documentation can be found here: http://sourceforge.net/projects/automysqlbackup

Compatibility

Ever since 0.2.X, this module has been updated. Calling the 'automysqlbackup' class directly is no longer supported. See the changelog and usage below for more information.

The module has sucessfully been tested on Ubuntu (10.04 and 12.04), Debian (6 and 7), and CentOS (5.9 and 6.4). If you find it doesn't work on your platform, open up a ticket on the GitHub project page.

Variable Names

I have kept the same variable names as the author of the script to make it easier to lookup the documentation. Essentially, add CONFIG_ to the variable in question and regex search the documentation to find the meaning. No interpretation from me.

The exception to this rule are the "cron" variables which are local to the puppet module. They, as the variable names imply, install a script to be run by cron nightly in /etc/cron.daily/.

Supercedence

automysqlbackup.conf overwrites script values

Anything with an empty string implies that you are conceding to the default value in automysqlbackup.conf. Anything not specified in automysqlbackup.conf accepts the scripts builtin, default value of the script.

Usage

Usage comes in two ways. You can use the following in your manifests, or you can load the backup configurating into automysqlbackup::config and automysqlbackup::config_defaults via hiera or other ENC.

Basic:

include automysqlbackup
automysqlbackup::backup { 'automysqlbackup':
  mysql_dump_username  => 'root',
  mysql_dump_password  => 'password',
}

Daily backups only excluding certain databases and tables:

include automysqlbackup
automysqlbackup::backup { 'automysqlbackup':
  cron_template       => 'myrole/amb.cron.erb',
  mysql_dump_username => 'root',
  mysql_dump_password => 'password',
  do_monthly          => '0',
  do_weekly           => '0',
  db_exclude          => ['performance_schema','information_schema'],
  table_exclude       => ['mysql.event'],
}

Without cron job creation, changes the default backup directory:

class { 'automysqlbackup':
  backup_dir           => '/mnt/backups'
}

automysqlbackup::backup { 'automysqlbackup':
  mysql_dump_username  => 'root',
  mysql_dump_password  => 'password',
  cron_script          => false,
}

Running the script manually

After installation, you may wish to periodically run the script manually. This is possible by calling '/usr/local/bin/automysqlbackup config_file.conf'. The default config file is 'automysqlbackup.conf', and unless you specify 'automysqlbackup' when defining the backup instance (i.e. automysqlbackup::backup {'automysqlbackup': }), then you will need to correctly specify the name of the configuration file to use.

Support/Contribute

First, please read the developer's documentation for the automysqlbackup script. If there is an issue with the Puppet module, or you have an addition to make, please create a new issue or (even better) fork and change it, then provide me with either a patch or a pull request and I'll be happy to add it back in. If you have a feature you would like to see added, please create a new issue and I'll see if I can't add it in shortly.

Contributors

  • nextrevision
  • zsprackett
  • rhysrhaven
  • rjw1