This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
task :dump_db do | |
params = capture "cat #{deploy_to}/current/app/config/parameters.yml" | |
config = YAML.load(params) | |
backup_path = "#{fetch(:deploy_to)}/db_dumps" | |
run "mkdir -p #{backup_path}" | |
basename = 'database' | |
db_user = config['parameters']['database_user'] | |
db_pw = config['parameters']['database_password'] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
task :dump_db do | |
params = capture "cat #{deploy_to}/current/app/config/parameters.yml" | |
config = YAML.load(params) | |
backup_path = "#{fetch(:deploy_to)}/db_dumps" | |
run "mkdir -p #{backup_path}" | |
basename = 'database' | |
db_user = config['parameters']['database_user'] | |
db_pw = config['parameters']['database_password'] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
task :dump_db do | |
params = capture "cat #{deploy_to}/current/app/config/parameters.yml" | |
config = YAML.load(params) | |
backup_path = "#{fetch(:deploy_to)}/db_dumps" | |
run "mkdir -p #{backup_path}" | |
basename = 'database' | |
db_user = config['parameters']['database_user'] | |
db_pw = config['parameters']['database_password'] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set :keep_db_backups, 5 | |
set :backup_path, "db_dumps" | |
set :backup_name, "database" | |
task :dump_db do | |
# read symfony configuration from remote server | |
params = capture "cat #{deploy_to}/current/app/config/parameters.yml" | |
config = YAML.load(params) | |
backup_to = "#{fetch(:deploy_to)}/#{fetch(:backup_path)}" |