mirror of
https://github.com/tldr-pages/tldr.git
synced 2026-08-28 19:59:24 +08:00
bc1f42ad06
* pg_rewind: add page * Update pg_rewind.md --------- Co-authored-by: Sebastiaan Speck <12570668+sebastiaanspeck@users.noreply.github.com>
25 lines
854 B
Markdown
25 lines
854 B
Markdown
# pg_rewind
|
|
|
|
> Synchronize a PostgreSQL data directory with another data directory that was forked from it.
|
|
> More information: <https://www.postgresql.org/docs/current/app-pgrewind.html>.
|
|
|
|
- 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]}}`
|