Set up database replication for high availability and disaster recovery. Use when configuring master-slave replication, multi-master setups, or replication monitoring.
Configure database replication for disaster recovery, load distribution, and high availability. Covers master-slave, multi-master replication, and monitoring strategies.
PostgreSQL - Configure Primary Server:
-- On primary server: postgresql.conf
-- wal_level = replica
-- max_wal_senders = 10
-- wal_keep_size = 1GB
-- Create replication user
CREATE ROLE replication_user WITH REPLICATION ENCRYPTED PASSWORD 'secure_password';
-- Allow replication connections: pg_hba.conf
-- host replication replication_user standby_ip/32 md5
-- Enable WAL archiving for continuous backup
-- archive_mode = on
-- archive_command = 'test ! -f /archive/%f && cp %p /archive/%f'
Detailed implementations in the references/ directory:
| Guide | Contents | |---|---| | Master-Slave (Primary-Standby) Setup | Master-Slave (Primary-Standby) Setup | | Logical Replication | Logical Replication | | Master-Slave Setup | Master-Slave Setup |
Copy a source-pinned command for your client. You run it yourself.
Destination: .claude/skills/data-replication-setup · pinned to the source commit
git clone https://github.com/aj-geddes/useful-ai-prompts.git
cd useful-ai-prompts
git checkout 3f5182cfd739fc113f4af5244a1cf342ad7f7911
mkdir -p ".claude/skills/data-replication-setup"
cp -r "skills/data-replication-setup" ".claude/skills/data-replication-setup"Review the source before running. This copies files into your project; it is not a one-click install and does not verify runtime safety.
Scanner static-checks@0.1.0 · commit 3f5182cfd739. Static checks cannot prove runtime safety – review the source and the exact diff before installing. How checks work.
References credentials, tokens or secret files that a skill should not need.
Evidence: [redacted]· fingerprint 0be64ae89ddd24e2