Almost every privacy and security regulation in force today — GDPR, HIPAA, SOC 2, ISO 27001, PCI DSS, DPDPA — asks the same question in different words: “Can you prove what data you had, when you had it, and who changed it?”
A database audit trail is the answer. It is an immutable, integrity-checked record of every create, update, and (where allowed) delete operation against the data you store about your users. Without one, you cannot:
Building a real audit trail in your own database — triggers, history tables, hash chains, retention rules, access control on the history itself — is a quarter of engineering work that most teams keep pushing to the next sprint. Databunker Pro ships it as a feature.
Databunker Pro’s record versioning feature automatically creates a new, immutable version every time a user profile or application-data record is written. Each version captures:
Versioning is opt-in — you enable it once in databunker.yaml and it begins capturing every subsequent write:
|
|
After restart, every UserCreate, UserUpdate, AppdataCreate, and AppdataUpdate produces a new version automatically. No application code to write. No triggers to maintain.
|
|
Returns the full version list with timestamps and integrity hashes. Pick the version that covers March 14th, then fetch the snapshot:
|
|
Compare the MD5 hashes returned in UserListVersions. If they differ, the record was changed. The hash is computed over the full encrypted payload — modifying the database row directly without going through the Databunker API breaks the hash chain and shows up immediately.
A support engineer accidentally overwrote a customer’s phone number? Retrieve the previous version and re-UserUpdate with the old value. No DBA, no backup restore, no downtime.
Every call to UserListVersions and UserGet (including version-specific reads) is logged. Combined with Databunker Pro’s CRBAC access-control policies, you can restrict who is allowed to look at historical versions at all — frontline support sees only the current state; the privacy office and forensics get the full history.
Backups recover whole databases at fixed restore points. Audit trails reconstruct individual records at any point. They solve different problems:
| Question | Backup | Audit trail |
|---|---|---|
| “Restore everything to yesterday’s snapshot.” | ✅ | ❌ |
| “Show me how this one user’s record changed every Tuesday for a year.” | ❌ | ✅ |
| “Prove this profile has not been silently modified.” | ❌ (no integrity check) | ✅ (per-version MD5) |
| “Roll back a single field on a single record without affecting anyone else.” | ❌ | ✅ |
| “Generate a GDPR Article 30 processing-activity report.” | ❌ | ✅ |
A restored backup overwrites everything, including legitimate changes made since the backup ran. An audit trail is surgical — it gives you exactly the one historical fact you need without touching anything else. And, critically, a restored backup re-introduces records the user already exercised their right-to-erasure on — a regulator-visible violation. Record versioning lets you delete cleanly and prove the deletion happened.
A regulator asks for the state of a customer’s profile during a specific incident window. With record versioning, the privacy office runs UserListVersions, filters by timestamp, and exports the exact snapshots — with hashes proving they have not been edited after the fact.
A customer complains their email was changed and they did not change it. Versioning shows two updates: one self-service from the customer two months ago, one done by an internal account last week. The forensic trail names the operator, the policy that authorised the write, and the IP it came from.
SOC 2 Trust Services Criterion CC7.3 expects logged and monitored changes to system data. Auditors regularly ask for a sample of records and their change history. Versioning makes this a single API call instead of a SQL archaeology project across history tables and disaster-recovery backups.
For applications that store state in appdata (game progress, feature flags, multi-step onboarding), versioning gives you per-user undo without any new schema. Useful for support, useful for QA reproductions, useful when a bad migration writes garbage to half a million users.
After a user invokes their right to be forgotten and the record is deleted, the version chain remains in audit storage (subject to your retention policy) as evidence the deletion happened — without retaining the personal data itself.
max_versions and max_version_retention_period keep storage cost bounded and let you align history retention with your legal hold and minimisation requirements.Turn it on when any of the following is true:
It is a single configuration flag away — and once enabled, the audit trail builds itself.
A database audit trail used to be a compliance project — schema design, triggers, history tables, hash chains, retention jobs, access policies for the history itself. With Databunker Pro’s record versioning, it is a configuration line.
Every change to every user profile and every application-data record is captured, hashed, encrypted, and recoverable, with access governed by the same policies that protect the live data. That is enough to satisfy GDPR, HIPAA, SOC 2, ISO 27001, and DPDPA auditors — and enough to give your support and security teams answers they did not have before.
To see record versioning end-to-end, including API and SDK examples, read the Record versioning reference in the Databunker Pro documentation.
A free 30-minute working session with our compliance team — across SOC 2, ISO 27001, GDPR, HIPAA, DPDP and PCI DSS. We map every gap in your cloud and databases to the exact clause it violates, then send you a written remediation roadmap. Read-only access. No infrastructure changes.
Book My Free Compliance Assessment 🚀 Learn more →✓ 30-min call · ✓ Written assessment · ✓ No credit card required