Post Reply  Post Thread 
Deletion of config backups (cronjob)
Author Message
FeG
Junior Member
*


Posts: 136
Group: Registered
Joined: Aug 2007
Status: Offline
Reputation: 0
Post: #1
Deletion of config backups (cronjob)

Hi all..

I'd like to suggest to change the cronjob which deletes old config backups under /etc/ispcp/*/backup. At the moment (RC3), this command is used:

Code:
# Remove config backups older than seven days
@daily root find /etc/ispcp/*/backup/* -maxdepth 0 -type f -mtime +7 -print | egrep '.*\.[0-9]+$' | xargs -r /bin/rm


Problem is, that - at least on my server - /etc/ispcp/*/backup/* returns to much arguments, so find failes with argument list too long.

Therefore I changed this to:

Code:
# Remove config backups older than seven days
@daily root find /etc/ispcp/*/backup/ -maxdepth 1 -type f -mtime +7 -print | egrep '.*\.[0-9]+$' | xargs -r /bin/rm


.. which should work.

Greetings,
FeG

02-15-2008 07:38 PM
Find all posts by this user Quote this message in a reply
Post Reply  Post Thread 

View a Printable Version
Send this Thread to a Friend
Subscribe to this Thread | Add Thread to Favorites

Forum Jump:

| All rights reserved : isp-control.net |