commands.sh

pg_rewind

all

Synchronize a PostgreSQL data directory with another data directory that was forked from it.

More info →

Options (4)

-D, --target-pgdataboolean

Synchronize target directory with source directory

Example: pg_rewind {{[-D|--target-pgdata]}} {{path/to/target_data}} --source-pgdata {{path/to/source_data}}
-n, --dry-runboolean

Perform a dry run

Example: pg_rewind {{[-D|--target-pgdata]}} {{path/to/target_data}} --source-pgdata {{path/to/source_data}} {{[-n|--dry-run]}}
-P, --progressboolean

Show progress during synchronization

Example: pg_rewind {{[-D|--target-pgdata]}} {{path/to/target_data}} --source-pgdata {{path/to/source_data}} {{[-P|--progress]}}
--helpboolean

Display help

Example: pg_rewind {{[-?|--help]}}

Examples (5)

Synchronize target directory with source directory

pg_rewind [-D|--target-pgdata] path/to/target_data --source-pgdata path/to/source_data

Synchronize target with source server using connection string

pg_rewind [-D|--target-pgdata] path/to/target_data --source-server connstr

Perform a dry run

pg_rewind [-D|--target-pgdata] path/to/target_data --source-pgdata path/to/source_data [-n|--dry-run]

Show progress during synchronization

pg_rewind [-D|--target-pgdata] path/to/target_data --source-pgdata path/to/source_data [-P|--progress]

Display help

pg_rewind [-?|--help]
made by @shridhargupta | data from tldr-pages