Skip to content

Instantly share code, notes, and snippets.

@Evgen1983

Evgen1983/backup.rb

Created Nov 29, 2016
Embed
What would you like to do?
# encoding: utf-8
##
# Backup Generated: cartridgeshop_backup
# Once configured, you can run the backup with the following command:
#
# $ backup perform -t cartridgeshop_backup [-c <path_to_configuration_file>]
#
# For more information about Backup's components, see the documentation at:
# http://backup.github.io/backup
#
Model.new(:cartridgeshop_backup, 'Description for cartridgeshop_backup') do
##
# PostgreSQL [Database]
#
database PostgreSQL do |db|
# To dump all databases, set `db.name = :all` (or leave blank)
db.name = "ваше приложение_production"
db.username = "postgres"
db.password = "вашпароль"
db.host = "localhost"
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 = ["-xc", "-E=utf8"]
end
##
# Local (Copy) [Storage]
#
store_with Local do |local|
local.path = "~/backups/"
local.keep = 5
# local.keep = Time.now - 2592000 # Remove all backups older than 1 month.
end
##
# Gzip [Compressor]
#
compress_with Gzip
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment