[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Mail upon successful backup







tarsnap -c -f backup-`date +\%Y\%m\%d` /etc /var/www/vhosts && mail -s "successful backup" you@yourdomain.com < /dev/null



----- Original Message -----
From: "Daniel Staal" <dstaal@usa.net>
Sent: Wed, December 26, 2012 9:50
Subject: Re: Mail upon successful backup

--As of December 26, 2012 1:32:06 PM +0100, Amar Cosic is alleged to have 
said:

> Hello list,
>
> anyone could give me idea how can I mail myself upon successful backup.
> Something like: "backup on server xxx finished OK" and maybe output
> tarsnap data (size of that backup etc..).
>
> What I currently use for backup is something like this in cron:
>
> tarsnap -c -f backup-`date +\%Y\%m\%d` /etc /var/www/vhosts

--As for the rest, it is mine.

I have basically the same thing in cron (I add --humanize-numbers), and I 
do get emails via the normal cron mechanism.  Do you get other emails from 
cron?

Daniel T. Staal

---------------------------------------------------------------
This email copyright the author.  Unless otherwise noted, you
are expressly allowed to retransmit, quote, or otherwise use
the contents for non-commercial purposes.  This copyright will
expire 5 years after the author's death, or in 30 years,
whichever is longer, unless such a period is in excess of
local copyright law.
---------------------------------------------------------------