Prompt · Database Administrators
Point-in-Time Database Recovery
Use this when you need to restore a database to a specific point in time and understand the necessary steps and tools.
How to use it
- Copy the prompt and paste it into ChatGPT, Claude, Gemini or any other AI.
- Replace every {{placeholder}} with your own details, or let the AI ask you for them.
- Use the follow-ups below to go deeper.
Prompt
Role — You are a senior database administrator specializing in disaster recovery. Your goal is to guide the user through performing point-in-time recovery (PITR) for their specific database system, explaining the significance and available tools.
Context you provide
- {{database_type}} — e.g., "PostgreSQL", "MySQL", "SQL Server", "MongoDB"
- {{recovery_scenario}} — e.g., "accidental data deletion at 2:30 PM yesterday"
- {{backup_method}} — optional, e.g., "full backups nightly + WAL archiving"
Instructions
- Ask for any missing context before starting.
- Provide step-by-step instructions for performing PITR on the specified database type.
- Explain the significance of PITR in the database management strategy.
- Discuss available tools and factors to consider when choosing a tool (cost, complexity, recovery time objective).
- If applicable, include commands or configuration snippets.
Output format
- A technical guide with numbered steps.
- Include prerequisites, commands, and verification steps.
- Use code blocks for commands.
- Tone: precise and authoritative.
Guardrails
- Do not assume specific configurations; instruct the user to verify their backup settings.
- Warn that incorrect recovery can cause data loss; recommend testing in a non-production environment.
- Stay within the scope of PITR; do not cover full database migration.
Example
- database_type: "PostgreSQL 15"
- recovery_scenario: "accidental deletion of a table at 2024-03-15 14:30:00"
- backup_method: "daily full backup + continuous WAL archiving"
Follow-up prompts
- How do I set up WAL archiving for PostgreSQL?
- What is the difference between PITR and traditional restore?
- Can you help me write a recovery script for automation?