crarchive

A program to archive output generated from cron jobs
Download

crarchive Ranking & Summary

Advertisement

  • Rating:
  • License:
  • GPL
  • Price:
  • FREE
  • Publisher Name:
  • Frank Huang
  • Publisher web site:
  • http://nongraphical.com/

crarchive Tags


crarchive Description

A program to archive output generated from cron jobs crarchive is a small script to solve a small prob?lem with cron.Say one has in one’s crontab the fol­low­ing line:0 0 * * * /usr/bin/rsync -avz dir1/ /back­up/dir1/This backs up dir1 to a back­up di­rec­to­ry. rsync, how­ev­er, cre­ates a lot of out­put (espe­cial­ly with the -v switch)… and cron sends that out­put to your email, so ev­ery day, you’ll be get­ting an email mes­sage from cron with the re­sults of the back­up. To avoid this, most peo­ple sim­ply redi­rect the out­put to /dev/null. What if I do ac­tu­al­ly want to see the out­put though, just not in my in­box? crar­chive is a lit­tle script that will log the re­sults of cron runs in a fold­er, gzip old logs, and delete re­al­ly old logs au­to­mat­i­cal­ly. It al­lows the out­put of com­mands run in cron to be saved and archived, but with­out clog­ging up your in­box. Even­tu­al­ly, it will al­so sup­port more cus­tomiz­abil­i­ty, but be­cause this is on­ly the first re­lease, it has the fol­low­ing lim­i­ta­tions… * Max­i­mum one run per day * Logs to $HOME/logs (un­change­able) * Gzips logs that are one day old, deletes logs that are thir­ty (un­change­able)crar­chive will, how­ev­er, email you if some­thing goes wrong (un­for­tu­nate­ly, again, er­ror check­ing in this ear­ly ver­sion is prim­i­tive). Here’s a usage ex­am­ple with the crontab from ear­lier (as­sum­ing we’ve in­stalled crar­chive.py in­to /usr/bin):0 0 * * * /usr/bin/rsync -avz dir1/ /back­up/dir1/ | /usr/bin/crar­chive.py rsync-dir1Where rsync-dir1 is an ar­bi­trary name that you choose. Requirements: · Python What's New in This Release: · Limitations in this version are: a maximum of one run per day; logs to '$HOME/logs' (unchangeable); and gzips logs that are one day old and deletes logs that are thirty (unchangeable).


crarchive Related Software