Data Replication Setup

Data Replication Setup

Guides a coding agent through setting up database replication for high availability and disaster recovery, including primary-standby, multi-master and monitoring.

Skill files6 files

references/

scripts/

templates/

SKILL.md78 lines
1
---
2
name: data-replication-setup
3
description: >
4
Set up database replication for high availability and disaster recovery. Use
5
when configuring master-slave replication, multi-master setups, or replication
6
monitoring.
7
---
8
9
# Data Replication Setup
10
11
## Table of Contents
12
13
- [Overview](#overview)
14
- [When to Use](#when-to-use)
15
- [Quick Start](#quick-start)
16
- [Reference Guides](#reference-guides)
17
- [Best Practices](#best-practices)
18
19
## Overview
20
21
Configure database replication for disaster recovery, load distribution, and high availability. Covers master-slave, multi-master replication, and monitoring strategies.
22
23
## When to Use
24
25
- High availability setup
26
- Disaster recovery planning
27
- Read replica configuration
28
- Multi-region replication
29
- Replication monitoring and maintenance
30
- Failover automation
31
- Cross-region backup strategies
32
33
## Quick Start
34
35
**PostgreSQL - Configure Primary Server:**
36
37
```sql
38
-- On primary server: postgresql.conf
39
-- wal_level = replica
40
-- max_wal_senders = 10
41
-- wal_keep_size = 1GB
42
43
-- Create replication user
44
CREATE ROLE replication_user WITH REPLICATION ENCRYPTED PASSWORD 'secure_password';
45
46
-- Allow replication connections: pg_hba.conf
47
-- host replication replication_user standby_ip/32 md5
48
49
-- Enable WAL archiving for continuous backup
50
-- archive_mode = on
51
-- archive_command = 'test ! -f /archive/%f && cp %p /archive/%f'
52
```
53
54
## Reference Guides
55
56
Detailed implementations in the `references/` directory:
57
58
| Guide | Contents |
59
|---|---|
60
| [Master-Slave (Primary-Standby) Setup](references/master-slave-primary-standby-setup.md) | Master-Slave (Primary-Standby) Setup |
61
| [Logical Replication](references/logical-replication.md) | Logical Replication |
62
| [Master-Slave Setup](references/master-slave-setup.md) | Master-Slave Setup |
63
64
## Best Practices
65
66
### ✅ DO
67
68
- Follow established patterns and conventions
69
- Write clean, maintainable code
70
- Add appropriate documentation
71
- Test thoroughly before deploying
72
73
### ❌ DON'T
74
75
- Skip testing or validation
76
- Ignore error handling
77
- Hard-code configuration values
78

© AJ Geddes · MIT · source · posted by @OpenSourceBuffGuy on promptparty.com

@OpenSourceBuffGuy

I find openly licensed prompts and post them here.

0 followers · 14,621 prompts

More by @OpenSourceBuffGuy

See all
Sea turtle carrying floating film studio island prompt image

Sea turtle carrying floating film studio island

Draws a giant sea turtle carrying a floating island film studio through a starry sky, where fairies polish rough film strips into golden film.

image-prompt, nano-banana, 3d-render, cartoon, fantasy-world, creatures, animals, whimsical, dreamy, cinematic, dramatic-lighting, vibrant-colors, bokeh, miniature, widescreen, night-scene, illustration, concept-art, surreal, storytelling, clay-3d

Desert buggy escapes drones past industrial outpost prompt image

Desert buggy escapes drones past industrial outpost

Builds a 15-second desert chase video where a racer in an armored buggy escapes drones past an industrial outpost, using five reference images with set jobs.

video-prompt, hailuo, action, multi-shot, timed-beats, camera-movement, reference-image, character-consistency, negative-prompt, cinematic, sci-fi, cars, landscape, aerial-view, tracking-shot, photorealistic, sound-effects, structured-output, long-form, widescreen

1 view
Cozy Pixel Art Farm Island Village prompt image

Cozy Pixel Art Farm Island Village

Draws a cozy 16-bit pixel-art farming village across six small islands joined by bridges, with exact counts for buildings, animals and crops.

image-prompt, gpt-image, pixel-art, isometric, game-assets, concept-art, maps, worldbuilding, cozy, vibrant-colors, ocean, landscape, wide-shot, widescreen, game-development, video-games, structured-output, whimsical, summer, high-angle, aerial-view, animals, negative-prompt, cityscape

1 view

Reviews

Loading reviews…

Discussion

Loading comments…