Skip to content

Instantly share code, notes, and snippets.

@col
Last active December 11, 2015 10:18
Show Gist options
  • Save col/4585240 to your computer and use it in GitHub Desktop.
Save col/4585240 to your computer and use it in GitHub Desktop.
Example config/backup.rb file for use with the backup gem
Backup::Model.new(:app_name_backup, 'Backup for App Name') do
database MySQL do |database|
database.name = 'app_name_production'
database.username = 'app_name'
database.password = 'password!'
end
#database PostgreSQL do |database|
# database.name = 'app_name_production'
# database.username = 'app_name'
# database.password = 'password!'
#end
compress_with Gzip
store_with S3 do |s3|
s3.access_key_id = '...aws-access-key...'
s3.secret_access_key = '...aws-secret-access-key...'
s3.bucket = 'app_name'
s3.path = '/backups'
s3.keep = '10'
end
store_with Local do |local|
local.path = "/var/backups/app_name/"
local.keep = 30
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment