# Audit.log file rotation

**URL:** <https://forums.percona.com/t/audit-log-file-rotation/24212>\
**Category:** Percona XtraDB Cluster 8.x\
**Tags:** mysql\
**Created:** [August 4, 2023, 3:16pm UTC](https://forums.percona.com/t/audit-log-file-rotation/24212 "2023-08-04T15:16:08Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Frak](https://avatars.discourse-cdn.com/v4/letter/f/f05b48/32.png) [@Frak](https://forums.percona.com/u/Frak)\
**Post date:** [August 4, 2023, 3:16pm UTC](https://forums.percona.com/t/audit-log-file-rotation/24212/1 "2023-08-04T15:16:08Z")

</div>

Hi all,  
I would like to force a rotation of the audit.log on an instance, it wasn’t set up

Is there a way to rotate the log withour restarting the intance?  
I’ve set  
audit\_log\_rotate\_on\_size = 10485760  
AND  
mysql\> set global audit\_log\_flush=ON;  
Query OK, 0 rows affected (0.00 sec)  
mysql\> set global audit\_log\_flush=OFF;  
Query OK, 0 rows affected (0.00 sec)

But nothing happens and the size remains the same.

Server version: 8.0.23-14.1 Percona XtraDB Cluster (GPL), Release rel14

Thank you for any suggestion!!

---

<div class="post-metadata">

**Author:** ![matthewb](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/matthewb/32/34_2.png) [@matthewb](https://forums.percona.com/u/matthewb)\
**Post date:** [August 4, 2023, 4:18pm UTC](https://forums.percona.com/t/audit-log-file-rotation/24212/2 "2023-08-04T16:18:30Z")

</div>

Hello @Frak,  
I found several issues related to audit log rotation in our [public JIRA](https://jira.percona.com/) There seems to be a consensus that upgrading to 8.0.30 fixed most audit rotation issues. I recommend you upgrade a replica or spin up a demo server and test in a more recent version.
