Here is a script I use:
#!/bin/sh
# do tar with the following options:
# c - create, v - verbose f - filename:
echo Doing full backup of Data file system...
now=`date`
title="full backup of /data, from $now"
logfile="logs/`date "+%y%m%d"`.data.full.log"
name="`date "+%y%m%d"`.data.tar"
echo > $logfile
echo >> $logfile
echo >> $logfile
echo >> $logfile
tail -f $logfile &
tar -cvf -\
/data \
2>> $logfile |\
dd obs=4000k 2>>$logfile >/opt/data_backup/$name
gzip /opt/data_backup/$name
echo $now > dates/date.backup.data
echo Ready.
echo Transcript written to $logfile .
This is just my 2 cents worth.
"Miguel G." wrote:
>
> Hi all!
>
> could anyone help me with a very simple script?
> (it simply doesn't work the variables stuff)
> and also how can I modify this (tar) to retrive only files which
> I might get as new from $(find ...)
>
> set $FN = etc-$(date +%Y-%m-%d)
> tar -cf $FN.tar /etc/
> gzip $FN.tar
>
> THANKS A LOT!!!!!
>
> --
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]