pg_basebackup
Take a base backup of a running PostgreSQL cluster. tldr-pages
On several platforms
Several platforms
Take a base backup of a running PostgreSQL cluster. Used for full or incremental backups, point-in-time recovery, or setting up replication standbys.
Take a base backup from a remote PostgreSQL server
pg_basebackup --host host --pgdata path/to/backup_dirIdentifyTake a backup with progress shown
pg_basebackup --host host --pgdata path/to/backup_dir --progressIdentifyCreate a compressed backup (gzip) in tar format
pg_basebackup --pgdata path/to/backup_dir --format [t --gzipIdentifyCreate an incremental backup using a previous manifest file
pg_basebackup --pgdata path/to/backup_dir --incremental path/to/old_manifestIdentifyWrite a recovery configuration for setting up a standby
pg_basebackup --pgdata path/to/backup_dir --write-recovery-confIdentifyRelocate a tablespace during backup
pg_basebackup --pgdata path/to/backup_dir --tablespace-mapping path/to/old_tablespace=path/to/new_tablespaceIdentifyLimit transfer rate to reduce server load
pg_basebackup --pgdata path/to/backup_dir --max-rate 100MIdentifyStream WAL logs while taking the backup
pg_basebackup --pgdata path/to/backup_dir --wal-method streamIdentify