Page 1 of 1

audit_db file kept growing

Posted: Fri Apr 05, 2019 11:19 pm
by Joanne
Hi, we have a scheduled task set up to run weekly that cleans up the audit log ( following the instruction from this thread http://www.wftpserver.com/bbs/viewtopic.php?f=2&t=3075" rel="nofollow" rel="nofollow" rel="nofollow), however I did notice the audit_db file has never gotten smaller even right after the cleanup task runs. I wonder if this is normal. Also I'd like to know if we manually remove the file from the server in case of emergency situation, would it impair the ftp service ? (It's ok if it just impacts the audit report generation)

The audit db file size issue has been going on for long time since we started using WFTPServer many years ago. Now we are running version 5.1.2 and the concern of the file size is growing as the file becomes larger.

Following is our scheduled task definition:

Code: Select all

--remove all the logs which are older than 30 days
c_DoSQL("delete from wftp_dblogs where f_time < datetime('now','localtime',’-30 day') ")

Re: audit_db file kept growing

Posted: Mon Apr 08, 2019 12:29 pm
by FTP
Sorry, that instruction is wrong, you can't delete audit records via WingFTP's Lua API, maybe you can consider to use SQLite client to manage that database file.

Re: audit_db file kept growing

Posted: Wed Apr 10, 2019 4:13 pm
by Joanne
ok. We will use SQLLite to delete the records. Do we also need to run VACUUM command periodically to save space or WFTP Server will do it automatically?

Re: audit_db file kept growing

Posted: Thu Apr 11, 2019 12:32 am
by FTP
OK, Wing FTP Server won't run the command "VACUUM" periodically.