Forge Home

xtrabackup

Puppet module for setting up percona xtrabackup to backup a MariaDB, Percona or MySQL server

34,274 downloads

33,463 latest version

3.9 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.1.3 (latest)
  • 0.1.2
  • 0.1.1
  • 0.1.0
released Mar 7th 2014

Start using this module

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

Add this module to your Puppetfile:

mod 'abstractit-xtrabackup', '0.1.3'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add abstractit-xtrabackup
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install abstractit-xtrabackup --version 0.1.3

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

abstractit/xtrabackup — version 0.1.3 Mar 7th 2014

abstractit-xtrabackup

####Table of Contents

  1. Overview - What is the xtrabackup module?
  2. Module Description - What does the module do?
  3. Setup - The basics of getting started with xtrabackup
  4. Usage - The parameters available for configuration
  5. Implementation - An under-the-hood peek at what the module is doing
  6. Limitations - OS compatibility, etc.
  7. Development - Guide for contributing to the module
  8. Release Notes - Notes on the most recent updates to the module

Overview

Puppet module for setting up percona xtrabackup to backup a MariaDB, Percona or MySQL server

Module Description

Manages incremental and/or differential and full backups of your data directory using Perconas awesome xtrabackup.

Setup

what xtrabackup affects:

  • the xtrabackup sericve
  • configuration files for xtrabackup

Beginning with xtrabackup

This will manage a basic setup for xtrabackup.

# on your database node
include xtrabackup
# set these vars with hiera
$xtrabackup::type # incremental, differential or both
$xtrabackup::backup_server # $::fqdn of backup server (defaults to backup.$::domain)
$xtrabackup::rsync_ip # $::ipaddress for rsync to backup server
$xtrabackup::inc_hours # array of hours for incremental backup
$xtrabackup::diff_hours # array of hours for differential backup
$xtrabackup::full_hours # array of hours for full backup
$xtrabackup::full_keep # age of full backup files to keep in tidy format ie: 1w, 1d etc
$xtrabackup::inc_keep # age of incremental backup files to keep in tidy format ie: 1w, 1d etc
$xtrabackup::diff_keep # age of differential baclup files to keep in tidy format ie: 1w, 1d etc

# or as class vars
# incremental backups
class { 'xtrabackup':
  type          => 'incremental',
  full_hours    => ['9','18'],
  inc_hours     => ['0','12'],
  full_keep     => '1w',
  inc_keep      => '1d',
  backup_server => 'backup.domain.com',
}
# diferential backups
class { 'xtrabackup':
  type          => 'differential',
  full_hours    => ['9','18'],
  inc_hours     => ['0','12'],
  full_keep     => '1w',
  diff_keep     => '1d',
  backup_server => 'backup.domain.com',
}
# both
class { 'xtrabackup':
  type          => 'both',
  full_hours    => ['18'],
  inc_hours     => ['0','12'],
  diff_hours    => ['6','9'],
  full_keep     => '1w',
  inc_keep      => '1d',
  diff_keep     => '1d',
  backup_server => 'backup.domain.com',
}

# on your backup server
# this will import all rsyncs where the fqdn of this noce was used as the backup_server
include xtrabackup::remote

Usage

Implementation

Uses files based on templates to manage the xtrabackup configuration files

Limitations

Backup crons need stored configs on your puppet master. I recommend using PuppetDB for this.

Development

All development, testing and releasing is done by Abstract IT at this stage. If you wish to join in let me know.

Release Notes

0.1.3

switch to ipaddress for remote rsync hostname

0.1.2

set default for remote_days to *

0.1.1

fix some paramater names

0.1.0

Initial release