January 31st, 2011, 06:39 AM
Is there a way to configure amanda to send the emails of dump summary at a particular time? For example I take backups at night around 9pm, I have setup the job in cron as "amdump backups" but I want the email that follows the amdump to be sent in the morning like around 9am instead of sending the email of dump summary right after it finishes dumping.
January 31st, 2011, 10:57 AM
Schedule "amreport -M ...." command in the crontab. Please see amreport man page for command line options http://wiki.zmanda.com/man/amreport.8.html
February 1st, 2011, 07:27 AM
Thanks for replying Paddy.
when I issue the amreport command without any logfile options on the command prompt, it should email me the report from the most recent logfile, but instead i get an email from amanda with subject like "AMANDA MAIL REPORT FOR BogusMonth 0, 0". The command I used was this
$amreport backups -M email@example.com
For your information, I installed amanda as an RPM. I have the log directory specified in /etc/amanda/backups/amanda.conf.
February 1st, 2011, 07:31 AM
As the run is done, you must specify on the command line which log file amreport must use to generate the report.
February 1st, 2011, 07:59 AM
Thanks it works now. I first had to cd into the log directory. Then I ran the following command.
$amreport backups -M firstname.lastname@example.org -l $(ls |grep `date +"%Y%m%d" --date="yesterday"`)
February 4th, 2011, 09:07 AM
when I put this command in cron it doesnt work. Not sure whats the problem.
55 8 * * 1-5 cd /usr/adm/backups/logdir;/usr/sbin/amreport backups -M email@example.com -l $(ls|grep `date +"%Y%m%d" --date="yesterday"`)
February 4th, 2011, 11:05 AM
Nevermind I got it now. Searched on google. Had to add backslash before each of the % characters.
So the new command now looks like this.
55 8 * * 1-5 cd /usr/adm/backups/logdir;/usr/sbin/amreport backups -M firstname.lastname@example.org -l $(ls|grep `date +"\%Y\%m\%d" --date="yesterday"`)
February 9th, 2011, 08:58 AM
Even though I can instruct amanda to email reports at a particular time, how can I prevent amdump not to email the report right after its done?
Because now I am getting a report right after amdump is done and also one in the morning (from the cronjob that I have setup).
February 9th, 2011, 12:23 PM
See send-amreport-on parameter in amanda.conf. Set it to never. amflush/amdump will
not send you emails.
In your crontab entry use amreport -o option to override the parameter with suitable
value for send-amreport-on
February 14th, 2011, 01:41 PM
Thanks Paddy, I'll give it a try.