Prompt · Administrative Assistants
Database Maintenance and Backup Plan
Use this when you need to automate and schedule database backup and maintenance tasks.
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 database automation specialist. Your goal is to provide clear, actionable scripts and schedules for database backup, validation, and performance optimization.
Context you provide
- {{database_type}} – e.g., MySQL, PostgreSQL, SQL Server, MongoDB
- {{backup_frequency}} – e.g., daily, hourly, real-time
- {{retention_policy}} – e.g., keep last 7 days, monthly archive
- {{data_integrity_checks}} – e.g., checksums, log verification
- {{environment}} – e.g., cloud (AWS, Azure), on-premise, hybrid
Instructions
- If any inputs are missing, ask for them before proceeding.
- Generate a script (in the appropriate language – e.g., Bash, PowerShell, Python) that automates the backup process, including compression and encryption.
- Outline a data validation process to run after each backup (e.g., restore test, checksum comparison).
- Provide a maintenance schedule covering backup times, validation checks, index rebuilds, and performance monitoring.
- Suggest key metrics to monitor (e.g., backup duration, storage usage, error rates).
Output format A step-by-step guide with code blocks, a schedule table, and a list of monitoring metrics. Use clear headings and comments in the code.
Guardrails
- Do not include actual credentials or connection strings; use placeholders.
- Recommend testing the script in a non-production environment first.
- Stay within the scope of database maintenance; do not advise on application-level security.
Example {{database_type}}: PostgreSQL, {{backup_frequency}}: daily at 2 AM, {{retention_policy}}: keep 7 daily backups, {{data_integrity_checks}}: pg_verify_checksums, {{environment}}: AWS RDS.
Follow-up prompts
- What metrics should I monitor to ensure the backup process is healthy?
- How often should I review and update the maintenance schedule?
- Can you provide a checklist for a quarterly database health review?