AUDIT.ROTATE
AUDIT.ROTATE
- Group
- Audit
- Complexity
- O(1)
- Arity
- 1 (exactly, counting the command name)
- Flags
- admin, slow
- HotKV Cloud
- Scale
- On-Premise
- requires the audit-log license feature
AUDIT.ROTATE renames the current audit log file to
<file>.<YYYYMMDD_HHMMSS> (the time in UTC) and starts writing new entries
to a fresh file under the configured name. Use it to archive the log on your
own schedule. HotKV also rotates on its own once the file grows past
max_size (audit.max-size, 100 MB by default).
AUDIT.VERIFY and AUDIT.EXPORT work on the current file only, so export or verify the log before you rotate it if you need the old entries in one piece. The command cannot be called from a script.
Return value
Section titled “Return value”Simple string OK in RESP2 and RESP3, or one of these errors:
| Case | Error |
|---|---|
Audit logging is off (audit.enabled is no) |
ERR audit logging is not enabled |
| The new log file could not be opened | ERR audit log rotation failed, see the server log |
No license that includes audit-log |
NOLICENSE audit-log requires a HotKV license. Contact sales@hotkv.com |
If the log file was removed from outside while the server ran, the command
starts a new file and answers OK; the server log records a warning.
Examples
Section titled “Examples”127.0.0.1:6379> AUDIT.ROTATEOKCompatibility
Section titled “Compatibility”HotKV-only command.
See also
Section titled “See also”Was this page helpful?
Thanks for the feedback.