You can share your Lua Scripts with everybody here.

Monthly task for audit database maintenance

Tue Apr 20, 2021 1:22 am

If you have large FTP traffics, the audit database will increase very fast, then it will be very slow (or unable) to get Audit & Report, so you need a scripting task to move the audit db into a backup folder monthly.

Code:
c_SetGlobalOptionInt(GOPTION_AUDIT_ENABLE_INT, 0)
c_DisconnectSQLITE()
os.rename(c_GetAppPath().."/Log/audit_db", "d:/audit_db_"..os.date("%Y_%m_%d",os.time()))
c_SetGlobalOptionInt(GOPTION_AUDIT_ENABLE_INT, 1)



You may add a monthly task and input the above script, and modify the string "d:/audit_db_" into your own path
Image