Giter VIP home page Giter VIP logo

puppet-automysqlbackup's Introduction

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

puppet-automysqlbackup's People

Contributors

nextrevision avatar rhysrhaven avatar zsprackett avatar rjw1 avatar vekexasia avatar daks avatar

Watchers

James Cloos avatar Nicolas Vanheuverzwijn avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.