Skip to content

Instantly share code, notes, and snippets.

@krisf
Created June 29, 2017 17:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save krisf/56fc1df1b049c197cce6d0645ba29a51 to your computer and use it in GitHub Desktop.
Save krisf/56fc1df1b049c197cce6d0645ba29a51 to your computer and use it in GitHub Desktop.
Backup::Model.new(:appbackup, 'appbackup') do
store_with Local do |local|
local.path = '/backups/'
# Use a number or a Time object to specify how many backups to keep.
local.keep = 14
end
compress_with Bzip2
database PostgreSQL do |db|
# To dump all databases, set `db.name = :all` (or leave blank)
db.name = ENV['DB_NAME']
db.username = ENV['DB_USER']
db.password = ENV['DB_PASS']
db.host = ENV['DB_HOST']
db.port = 5432
#db.socket = "/tmp/pg.sock"
# When dumping all databases, `skip_tables` and `only_tables` are ignored.
#db.skip_tables = ['skip', 'these', 'tables']
#db.only_tables = ['only', 'these' 'tables']
#db.additional_options = []
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment