Table rotation and archiving
Keep large tables manageable with rotation, extension and archiving, without losing what audit needs.
Keep large tables manageable with rotation, extension and archiving, without losing what audit needs.
- Rotation for logs, archiving for records with retention obligations
- Retention policy comes before configuration
- Include related records in archive rules
- Prove restore works before relying on archiving
Three mechanisms
Table rotation moves rows into dated shards and drops the oldest, which suits log data. Table extension keeps adding shards without deleting, which suits data that must be retained but rarely read. Archiving copies records to archive tables and removes them from the active table, with restore available.
Choosing
Match the mechanism to the retention rule. Logs that nobody reads after 30 days belong in rotation. Closed incidents that auditors may request in three years belong in archiving with a documented restore procedure.
Doing it safely
Archiving touches production data, so plan it.
- Write the retention policy first and get it signed off
- Archive rules should include related records such as attachments and audit entries
- Test restore before you trust the process
- Run the first archive on a clone with production volume to size the job