s3_backup

Backup various stuff to S3

fadeit

fadeit

7,725 downloads

6,886 latest version

4.6 quality score

Version information

  • 0.2.0 (latest)
  • 0.1.0
released Dec 11th 2015
This version is compatible with:
  • Ubuntu

Start using this module

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