audit_db file kept growing

Please post here if you have problems in using Wing FTP Server.
Post Reply
Joanne
Posts: 4
Joined: Thu Mar 29, 2018 11:24 pm

audit_db file kept growing

Post 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') ")
FTP
Site Admin
Posts: 2072
Joined: Tue Sep 29, 2009 6:09 am

Re: audit_db file kept growing

Post 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.
Joanne
Posts: 4
Joined: Thu Mar 29, 2018 11:24 pm

Re: audit_db file kept growing

Post 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?
FTP
Site Admin
Posts: 2072
Joined: Tue Sep 29, 2009 6:09 am

Re: audit_db file kept growing

Post by FTP »

OK, Wing FTP Server won't run the command "VACUUM" periodically.
Post Reply