ispCP - Board - Support - VHCS fork

Full Version: Deletion of config backups (cronjob)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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
Reference URL's