pg_rewind
all
Synchronize a PostgreSQL data directory with another data directory that was forked from it.
More info →Options (4)
-D, --target-pgdatabooleanSynchronize target directory with source directory
Example:
pg_rewind {{[-D|--target-pgdata]}} {{path/to/target_data}} --source-pgdata {{path/to/source_data}}-n, --dry-runbooleanPerform a dry run
Example:
pg_rewind {{[-D|--target-pgdata]}} {{path/to/target_data}} --source-pgdata {{path/to/source_data}} {{[-n|--dry-run]}}-P, --progressbooleanShow progress during synchronization
Example:
pg_rewind {{[-D|--target-pgdata]}} {{path/to/target_data}} --source-pgdata {{path/to/source_data}} {{[-P|--progress]}}--helpbooleanDisplay 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_dataSynchronize target with source server using connection string
pg_rewind [-D|--target-pgdata] path/to/target_data --source-server connstrPerform 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