Skip to content

Ask the HotKV docs

Answers come only from these docs and can be wrong; check the linked pages before you rely on them.

AUDIT.ROTATE

Last updated
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.

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.

127.0.0.1:6379> AUDIT.ROTATE
OK

HotKV-only command.

AUDIT.INFO, AUDIT.EXPORT