mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-03-21 06:02:14 +00:00
Update cheatsheets
This commit is contained in:
29
tldr/pg_rewind
Normal file
29
tldr/pg_rewind
Normal file
@@ -0,0 +1,29 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# 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]}}`
|
||||
Reference in New Issue
Block a user