Configuration
Record versioning is not enabled by default. To enable versioning, you need to configure it in yourdatabunker.yaml configuration file:
What Problems Does Record Versioning Solve?
1. Change History & Data Integrity
- ✅ Complete history of all data changes over time
- ✅ Track what changed and when it changed
- ✅ Verify data integrity with cryptographic hashes
- ✅ Maintain immutable record of data evolution
2. Data Recovery & Rollback
- ✅ Restore previous versions of user data
- ✅ Recover from accidental data modifications
- ✅ Undo unwanted changes quickly
- ✅ Maintain data consistency across systems
3. Change Tracking & Analysis
- ✅ Understand how user data evolves over time
- ✅ Analyze patterns in data modifications
- ✅ Identify data quality issues
- ✅ Support forensic investigations
How Record Versioning Works
Databunker Pro automatically creates a new version every time you:- Create a new user record
- Update a user profile
- Create application data
- Update application data
- Version number: Sequential integer starting from 1
- Operation time: Unix timestamp of when the version was created
- MD5 hash: Cryptographic hash for integrity verification
- Full record data: Complete snapshot of the record at that point in time
Supported Record Types
Record versioning is available for:| Record Type | API Endpoints | Use Case |
|---|---|---|
| User Profiles | UserListVersions, UserGet (with version) | Track user profile changes, email updates, phone number changes |
| Application Data | AppdataListVersions, AppdataGet (with version) | Track application-specific data changes, configuration updates |
User Profile Versioning
Listing User Versions
To see all versions of a user’s profile:Retrieving a Specific User Version
To retrieve a specific version of a user’s profile:JavaScript/TypeScript Example
Python Example
Application Data Versioning
Application data versioning works similarly to user profile versioning, but tracks changes to application-specific data associated with users.Listing Appdata Versions
Retrieving a Specific Appdata Version
JavaScript/TypeScript Example
Python Example
Real-World Use Cases
1. Compliance & Audit Requirements
Many regulations require maintaining a complete history of data changes:2. Data Recovery
Restore previous versions when data is accidentally modified:3. Change Analysis
Analyze how user data changes over time:4. Application State Management
Track changes to application-specific data:Security Considerations
Access Control
Record versioning respects Databunker Pro’s Conditional Role-Based Access Control (CRBAC):- Policy Enforcement: Access to version history is controlled by policies
- Audit Logging: All version access operations are logged
Privacy Protection
- Encrypted Storage: All version data remains encrypted at rest
- Secure Transmission: Version requests use HTTPS encryption
- Access Logging: Complete audit trail of all version access activities
Version Metadata
Each version includes important metadata:| Field | Type | Description |
|---|---|---|
version | integer | Sequential version number (starts at 1) |
optime | integer | Unix timestamp when the version was created |
md5 | string | MD5 hash of the version data for integrity verification |
Conclusion
Databunker Pro’s Record Versioning feature provides a powerful, secure, and efficient way to track changes to user profiles and application data. By automatically maintaining a complete version history with cryptographic integrity verification, it enables applications to:- Meet compliance and audit requirements
- Recover from accidental data modifications
- Analyze data changes over time
- Maintain data integrity and security
- Compliance-driven applications (GDPR, HIPAA, etc.)
- Applications requiring audit trails
- Systems with frequent data updates
- Applications needing data recovery capabilities