PG_DATA = /var/lib/postgresql/data # home directory
1. Run on master
$ pg_basebackup -U postgres -D /tmp/pg_backupdata-25.03.2022/ -P -v --checkpoint=fast -R
2. Copy the base backup from master to slave's home directory
$ docker cp postgres-replication-master-1:/tmp/pg_backupdata-25.03.2022 ./
$ docker cp ./pg_backupdata-25.03.2022/. postgres-replication-slave-1:/var/lib/postgresql/data
3. Edit pg_hba.conf on master
4. Edit postgres.auto.conf on slave
5. Run some queries on master and see them replicated in slave
-
Notifications
You must be signed in to change notification settings - Fork 0
7codeRO/workshop-1-postgres-replication
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
No description, website, or topics provided.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published