archive_data
Archive old messages or audit logs to reduce database size. Moves records older than specified days from main to archive table. Admin only.
Instructions
手动触发数据归档。将指定天数之前的记录从主表移入归档表,以减少主表体积。可归档 messages(默认 30 天前)或 audit_log(默认 90 天前)。仅 admin 可调用。
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| type | Yes | 要归档的数据类型 | |
| days | No | 归档多少天前的数据(messages 默认 30 天,audit_log 默认 90 天) | |
| vacuum | No | 归档后是否执行 VACUUM 压缩数据库文件 |