Database Backup and Restore

Database Backup and Restore

Guides an AI agent to design database backup and restore strategies with retention, point-in-time recovery, restore testing and automation.

Skill files9 files

references/

scripts/

templates/

SKILL.md79 lines
1
---
2
name: database-backup-restore
3
description: >
4
Implement backup and restore strategies for disaster recovery. Use when
5
creating backup plans, testing restore procedures, or setting up automated
6
backups.
7
---
8
9
# Database Backup & Restore
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
Implement comprehensive backup and disaster recovery strategies. Covers backup types, retention policies, restore testing, and recovery time objectives (RTO/RPO).
22
23
## When to Use
24
25
- Backup automation setup
26
- Disaster recovery planning
27
- Recovery testing procedures
28
- Backup retention policies
29
- Point-in-time recovery (PITR)
30
- Cross-region backup replication
31
- Compliance and audit requirements
32
33
## Quick Start
34
35
**pg_dump - Text Format:**
36
37
```bash
38
# Simple full backup
39
pg_dump -h localhost -U postgres -F p database_name > backup.sql
40
41
# With compression
42
pg_dump -h localhost -U postgres -F p database_name | gzip > backup.sql.gz
43
44
# Backup with verbose output
45
pg_dump -h localhost -U postgres -F p -v database_name > backup.sql 2>&1
46
47
# Exclude specific tables
48
pg_dump -h localhost -U postgres database_name \
49
--exclude-table=temp_* --exclude-table=logs > backup.sql
50
```
51
52
## Reference Guides
53
54
Detailed implementations in the `references/` directory:
55
56
| Guide | Contents |
57
|---|---|
58
| [Full Database Backup](references/full-database-backup.md) | Full Database Backup |
59
| [Incremental & Differential Backups](references/incremental-differential-backups.md) | Incremental & Differential Backups |
60
| [Full Database Backup](references/full-database-backup-2.md) | Full Database Backup |
61
| [Binary Log Backups](references/binary-log-backups.md) | Binary Log Backups |
62
| [PostgreSQL Restore](references/postgresql-restore.md) | PostgreSQL Restore |
63
| [MySQL Restore](references/mysql-restore.md) | MySQL Restore |
64
65
## Best Practices
66
67
### ✅ DO
68
69
- Follow established patterns and conventions
70
- Write clean, maintainable code
71
- Add appropriate documentation
72
- Test thoroughly before deploying
73
74
### ❌ DON'T
75
76
- Skip testing or validation
77
- Ignore error handling
78
- Hard-code configuration values
79

© 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…