Downloads log is very large - how to limit the log?

Powerfull XFileSharing version

Moderator: admin

Message
Author
Hendrickson
Posts: 90
Joined: Nov 18, 2009 9:15 pm

Downloads log is very large - how to limit the log?

#1 Postby Hendrickson » Dec 02, 2009 6:53 pm

I noticed my downloads log (IP2Files) is becoming huge. Is there an option to limit the downloads log. I have some 340,000 pages of info taking up DB space.

Maybe an option to limit the log to 30 days only? And then purge the rest?

Any ideas?

admin
Site Admin
Posts: 1784
Joined: Mar 22, 2006 12:32 pm

Re: Downloads log is very large - how to limit the log?

#2 Postby admin » Dec 03, 2009 11:32 am

Hendrickson wrote:I noticed my downloads log (IP2Files) is becoming huge. Is there an option to limit the downloads log. I have some 340,000 pages of info taking up DB space.

Maybe an option to limit the log to 30 days only? And then purge the rest?

Any ideas?


Hello,

you can delete log file every X days using cron.

Something like:


Code: Select all

0 0 0 * * 0 rm -rf /your/path/to/log/file



It will delete log file weekly.

Hendrickson
Posts: 90
Joined: Nov 18, 2009 9:15 pm

#3 Postby Hendrickson » Dec 03, 2009 12:28 pm

Thanks I will try that. But I would like to keep the last 30 days and 30+ days to delete? is there a way to do that?

admin
Site Admin
Posts: 1784
Joined: Mar 22, 2006 12:32 pm

#4 Postby admin » Dec 03, 2009 12:49 pm

Hendrickson wrote:Thanks I will try that. But I would like to keep the last 30 days and 30+ days to delete? is there a way to do that?



Then it will looks like:

0 0 1 * * rm -rf /your/path/to/log/file


Return to “XFileSharing Pro”

Who is online

Users browsing this forum: No registered users and 0 guests