A GDPR deletion request arrives. The user's data is in Postgres, logs, S3 exports and backups. How do you handle it?

AdvancedScenarioData and databases
Answer

Situation read → Deletion has to cover every copy, within a deadline (one month under GDPR). Backups are the hard part, because you can't edit snapshots.

What I'd do →

  1. Keep a data map: every system that stores personal data, owned and documented.
  2. Primary stores: delete or anonymise via an automated workflow keyed by user ID, with an audit record of what was done.
  3. Logs: don't log PII in the first place (mask emails and IPs at the collector), and keep retention short so old logs expire on their own.
  4. S3 exports: lifecycle-expire them, and keep an index from user ID to object keys so they can be deleted.
  5. Backups: the common accepted approach is to let them expire on their normal retention and keep a "deleted users" list that's re-applied if a backup is ever restored. Document this in the privacy policy.
  6. An alternative for some data is crypto-shredding: encrypt each user's data with their own key and delete the key.

Why → Short retention and not logging PII make most of the problem go away before a request arrives.

Interview tip → Mention re-applying deletions after a restore; it shows you've thought about backups properly.

All Real-World Interview questions Roadmap: Interview readiness

More on Data and databases