Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- sudo -u postgres initdb -D /data/postgres/main
- listen_addresses = '*'
- wal_level = hot_standby
- max_wal_senders = 2
- logging_collector = on
- max_wal_senders = 5
- host replication replica 10.0.0.2/32 md5
- service postgresql start
- CREATE USER replica WITH REPLICATION ENCRYPTED PASSWORD '123456';
- SELECT pg_create_physical_replication_slot('standby_slot');
- pg_basebackup -h 10.0.0.1 -U replica -D /db/postgres/main -X s -P
- hot_standby = on
- standby_mode = 'on'
- primary_conninfo = 'host=10.0.0.1 port=5432 user=replica password=123456'
- primary_slot_name = 'standby_slot'
- trigger_file = 'trigger'
- service postgresql start
- service postgresql stop
- SELECT pg_backup_start('backup', true);
- SELECT pg_backup_stop();
- NOTICE: WAL archiving is not enabled; you must ensure that all required WAL segments are copied through other means to complete the backup
- FATAL: could not locate required checkpoint record
Add Comment
Please, Sign In to add comment