# REQUIRED: The credentials for creating/accessong your app's database # db_user: "#{app_name[0,16]}" db_pass: db_name: "#{app_name}_#{RUBBER_ENV}" db_slave_user: "#{('slave_' + db_user)[0,16]}" db_replicator_user: "#{('replicator_' + db_user)[0,16]}" # REQUIRED: The command to use to do a full backup of your database using # "rake rubber:backup_db" db_backup_cmd: "nice sudo -u postgres pg_dumpall -U postgres | gzip -c > %backup_file%" # REQUIRED: The command to use to restore the database using # "rake rubber:restore_db_s3" # This command will receive the data generated by db_backup_cmd via # its standard input db_restore_cmd: "zcat - | psql -Uroot -h %host% %name%" postgresql_ver: 8.4 postgresql_conf_dir: "/etc/postgresql/#{postgresql_ver}/main" postgresql_data_dir: /mnt/postgresql/data postgresql_archive_dir: /mnt/postgresql/archive postgresql_pid_file: "/var/run/postgresql/#{postgresql_ver}-main.pid" postgresql_ctl: "/usr/bin/env service postgresql-#{postgresql_ver}" # Capistrano needs db:primary role for migrate to work, # so we might as well just make consistent across the board role_dependencies: postgresql_master: [db:primary=true] postgresql_slave: [db] db:primary=true: [postgresql_master] db: [postgresql_slave] packages: [postgresql-client, libpq-dev] gems: [pg] roles: postgresql_master: db_server_id: 1 postgresql_slave: db_server_id: 2 db: packages: [postgresql]