Current time: 10-27-2020, 01:45 PM Hello There, Guest! (LoginRegister)


Post Reply 
Deletion of config backups (cronjob)
Author Message
FeG Offline
Banned

Posts: 222
Joined: Aug 2007
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 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)