crarchiveA program to archive output generated from cron jobs | |
Download |
crarchive Ranking & Summary
Advertisement
- 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 following line:0 0 * * * /usr/bin/rsync -avz dir1/ /backup/dir1/This backs up dir1 to a backup directory. rsync, however, creates a lot of output (especially with the -v switch)… and cron sends that output to your email, so every day, you’ll be getting an email message from cron with the results of the backup. To avoid this, most people simply redirect the output to /dev/null. What if I do actually want to see the output though, just not in my inbox? crarchive is a little script that will log the results of cron runs in a folder, gzip old logs, and delete really old logs automatically. It allows the output of commands run in cron to be saved and archived, but without clogging up your inbox. Eventually, it will also support more customizability, but because this is only the first release, it has the following limitations… * Maximum one run per day * Logs to $HOME/logs (unchangeable) * Gzips logs that are one day old, deletes logs that are thirty (unchangeable)crarchive will, however, email you if something goes wrong (unfortunately, again, error checking in this early version is primitive). Here’s a usage example with the crontab from earlier (assuming we’ve installed crarchive.py into /usr/bin):0 0 * * * /usr/bin/rsync -avz dir1/ /backup/dir1/ | /usr/bin/crarchive.py rsync-dir1Where rsync-dir1 is an arbitrary 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