pg_staging
Prepare a staging environment from http accessible backups
- Provided by: pgstaging (Version: 0.11-1)
- Report a bug
Prepare a staging environment from http accessible backups
[GLOBAL] [database_name.env]
Configuration file is a .ini containing several sections: first a GLOBAL section containing common options to the following sections, then a section per target database.
The [DEFAULT] section allows to provide default values for any setting describe here, that you can override in any of the specific sections.
Each specific section represent a target database to restore. The options will allow to say from which backup and on which host. The host knob is used in commands such as pg_restore, scp and ssh, so can be either an ip address or a hostname (resolv.conf applies).
backup_host
backup_base_url
dumpall_url
host
dbname
dbowner
dbuser
maintdb
db_encoding
CREATE DATABASE ... WITH OWNER "..." ENCODING ´...´;
postgres_port
postgres_major
pgbouncer_port
pgbouncer port to connect to, used for all pg_staging operations.
pgbouncer_conf
remove_dump
keep_bases
auto_switch
use_sudo
pg_restore
pg_restore_st
restore_vacuum
restore_jobs
replication
tmpdir
sql_path
schemas
search_path
schemas_nodata
[DEFAULT] backup_host = backup1.backbone dbuser = postgres maintdb = postgres postgres_port = 5432 postgres_major = 8.3 pgbouncer_port = 6432 pgbouncer_conf = /etc/pgbouncer/pgbouncer.ini remove_dump = True keep_bases = 2 auto_switch = True use_sudo = True pg_restore = /usr/lib/postgresql/%(postgres_major)s/bin/pg_restore pg_restore_st = True restore_vacuum = True restore_jobs = 1 replication = replication.ini
[allopass_db.dev] backup_base_url = /PostgreSQL/allopass_db/nightly/ dumpall_url = /PostgreSQL/clusters/bdd.allopass/8.2-main.globals.sql host = bdd.allopass.dev postgres_major = 8.2 dbname = allopass_db dbowner = root schemas = public, payment, utils, jdb
pg_staging is written by Dimitri Fontaine <dim@tapoueh.org[1]>.