Make your PostgreSQL base backup from a plain connection to the server (as superuser)
Switch branches/tags
Nothing to show


We take a base backup from a live server using a libpq connection.

Usage: [-v] [-f] [-j jobs] dest dsn

  -h, --help            show this help message and exit
  --version             show version and quit
  -x, --pg_xlog         backup the pg_xlog files
  -v, --verbose         be verbose and about processing progress
  -d, --debug           show debug information, including SQL queries
  -f, --force           remove destination directory if it exists
  -j JOBS, --jobs=JOBS  how many helper jobs to launch
  -D DELAY, --delay=DELAY
                        pg_xlog subprocess loop delay, see -x
  -S, --slave           auxilliary process
  --stdin               get list of files to backup from stdin

python /path/to/slave/pgdata host=remote user=postgres

Please not that while the backup is ongoing, we continue backuping the WAL
files in a loop (see -D for the loop delay), so that we have all what we
need on the slave as soon as the command finishes.

It should be able to use -x to copy the WAL files in an
infinite loop in order to prepare a warm standby over a libpq connection.