Forge Home

s3_backup

Backup various stuff to S3

8,382 downloads

7,520 latest version

4.6 quality score

Version information

  • 0.2.0 (latest)
  • 0.1.0
released Dec 11th 2015
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 'fadeit-s3_backup', '0.2.0'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add fadeit-s3_backup
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install fadeit-s3_backup --version 0.2.0

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

fadeit/s3_backup — version 0.2.0 Dec 11th 2015

s3_backup

Backup various stuff to S3

Usage

Install and configure

Install awscli, setup credentials and install backup scripts. 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                => 'eu-central-1',
}

Setup cron to backup /var/log directory 1AM, every night

s3_backup::backup_dir_cron { 'backup_log_dir':
  ensure      => present,
  bucket      => 's3://my-bucket',
  target_dir  => '/var/log',
  identifier  => 'log',
  minute      => '0',
  hour        => '1',
}

Once the schedule is executed, it will result in a compressed and timestamped backup archive E.g. s3://my-bucket/log-2015-10-18_01_00.tar.xz .

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

s3_backup::backup_pgsql_cron { 'backup_app_database':
  ensure      => present,
  bucket      => 's3://my-bucket',
  database    => 'app',
  minute      => '0',
  hour        => '2',
}

Once the schedule is executed, it will result in a compressed and timestamped backup archive E.g. s3://my-bucket/app-2015-10-18_02_00.psql.tar.xz .

Backup auth0 users 2AM, every night

s3_backup::backup_auth0_cron { 'backup_auth0_users':
  ensure      => present,
  bucket      => 's3://my-bucket',
  domain      => 'xxxxxx.auth0.eu',
  token       => 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
  minute      => '0',
  hour        => '2',
}

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

####About fadeit We love and are really good at designing & developing beautiful software, web and mobile applications.

See more at fadeit.dk