LinuxSA Mailing list archives

Index: [thread] [date] [subject] [author] [stats]
  From: Anthony Symons <ant@sa.pracom.com.au>
  To  : David Tanti <david@rtime.com.au>
  Date: 01 Nov 2001 17:55:31 +1030

Re: cron

You can point it to a shell script rather than the tar command itself.
Then have a script something like this (a cut down version of a backup
script we use here):


#!/bin/bash

# what to backup
DIRLIST="/etc /home/httpd /mnt/doco /mnt/server"

# look for backup subdirectorys in home dirs and back them up too
DYNAMICLIST=`find /home -maxdepth 2 -mindepth 2 -name backup`

#do the tar. /dev/st0 is scsi tape zero, but you probably want to use a
#file, or you could put it on another file system on another machine
#which is better again. smb is a quick and easy option.

tar -czvf /dev/st0 $DYNAMICLIST $DIRLIST 2>&1 1>/dev/null

#remind Ant to change the tape
echo -e "to:backups@foghorn\nfrom:backup@flanders\nsubject:FLANDERS:
backup `date` completed, change the tape" | sendmail -t




On Thu, 2001-11-01 at 17:27, David Tanti wrote:
> I have put an entry in /etc/crontab being
> 
> 30 22 * * 1-5 tar cvf /
> 
> I am relatively new to Linux and appreciate this is rather a crude way of
> backing up everthing.  I was wondering if it is possible when the backup has
> started or completed if I can get sent an email telling me.
> 
> Is there something I can add to the command above to achieve what I want.
> 
> Thanks very much
> 
> Regards
> David
> 
> -- 
> LinuxSA WWW: http://www.linuxsa.org.au/  IRC: #linuxsa on irc.linux.org.au
> To unsubscribe from the LinuxSA list:
>   mail linuxsa-request@linuxsa.org.au with "unsubscribe" as the subject
> 
-- 
Systems Administrator       
Pracom Ltd.             
+61 8 82029074 -=- +61 402 100 671 
anthony.symons@sa.pracom.com.au

PRIVILEGED - PRIVATE AND CONFIDENTIAL
This electronic mail is solely for the use of the addressee and may
contain information which is confidential or privileged.
If you receive this electronic mail in error, please delete it from
your system immediately and notify the sender by electronic mail or
using any of the above contact details.

-- 
LinuxSA WWW: http://www.linuxsa.org.au/  IRC: #linuxsa on irc.linux.org.au
To unsubscribe from the LinuxSA list:
  mail linuxsa-request@linuxsa.org.au with "unsubscribe" as the subject


Index: [thread] [date] [subject] [author] [stats]
Return to the LinuxSA Mailing List Information Page