Easy backup and cleanup for logfiles

Posted by Jens J├Ąger on December 03, 2008

For your applications in production you should keep some logfiles but delete the older ones to save files space.

The following bash script will do the job.

It will zip all files older than 7 days.
Delete all files older than 30 days.
Folders will be ignored.

I call the script in the crontab like this:

Trackbacks

Use this link to trackback from your own site.

Comments

Leave a response

Comments

Information about Data protection