Skip to content

n3rdly/puppet-MySQL_backup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

s3_backup

Backup various stuff to S3

Usage

Install and configure

Define AWS credentials in s3_backup class and and The access policy only needs to allow PutObject action in backup bucket.

class s3_backup {

  $aws_access_key_id = XXXXXXXXXXXXXXXXXXXX,
  $aws_secret_access_key = XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX,
  $region = xx-xxxx-x,

Setup cron to backup a specific MySQL database 2AM, every night

class s3_backup::backup_mysql_cron {
  require => Class['s3_backup'],
  $ensure = 'present',
  $bucket = s3://my-bucket,
  $host = $(hostname),
  $minute   = '0',
  $hour     = '2',
  $weekday  = '*',
  $monthday = '*',
  $month    = '*',

Once the schedule is executed, it will result in a compressed and timestamped backup archive E.g. s3://my-bucket/hostname-2017-04-25_02_00.mysql.tar.xz .

===================

About

Backup MySQL databases to S3

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published