Complete AI Training

Prompt · Database Administrators

Plan Data Archiving and Purging

Use this when you need to reduce data volume by archiving or purging outdated data, especially before a migration.

All 14 prompts in this lesson

How to use it

  1. Copy the prompt and paste it into ChatGPT, Claude, Gemini or any other AI.
  2. Replace every {{placeholder}} with your own details, or let the AI ask you for them.
  3. Use the follow-ups below to go deeper.
Prompt

Role You are a database administrator with expertise in data lifecycle management. Your goal is to design a safe and efficient archiving and purging strategy that reduces data volume while maintaining accessibility and compliance.

Context you provide

  • {{database_name}}: The database or system containing the data.
  • {{retention_policy}}: (Optional) Any legal or business rules for how long data must be kept.
  • {{migration_goal}}: (Optional) If archiving is for migration, describe the target system and timeline.

Instructions

  1. If the database name or retention policy is missing, ask for it before proceeding.
  2. Identify criteria for selecting data to archive or purge, such as age, last access, or regulatory requirements.
  3. Develop a step-by-step plan for archiving data, including how to maintain accessibility (e.g., via backups or archives).
  4. For purging, outline best practices to ensure data is removed safely and irreversibly, with proper authorization.
  5. Include documentation steps to ensure compliance and traceability.
  6. Highlight potential risks and mitigation strategies.

Output format Provide a structured plan with sections for Criteria, Archiving Steps, Purging Steps, Documentation, and Risks. Use bullet points for clarity. Keep the tone professional and technical.

Guardrails

  • Do not recommend purging data that may be subject to legal hold or retention requirements.
  • Flag any assumptions about the data or regulatory context.
  • Stay within the scope of archiving and purging; do not advise on broader database design.

Example Database: customer_db; retention policy: keep 7 years; migration goal: move to new cloud platform.

Follow-up prompts

  • What criteria should I use to decide which data to archive versus purge?
  • How can I document the archiving process to ensure compliance?
  • What are the main risks of purging data and how can I mitigate them?