Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 24 Apr 1999 11:19:11 +1000 (EST)
From:      "Daniel O'Callaghan" <danny@hilink.com.au>
To:        Andy Angrick <angrick@netdirect.net>
Cc:        FreeBSD-ISP@FreeBSD.ORG
Subject:   Re: tar
Message-ID:  <Pine.BSF.4.10.9904241103500.79604-100000@enya.clari.net.au>
In-Reply-To: <1.5.4.32.19990423200448.00b94170@netdirect.net>

next in thread | previous in thread | raw e-mail | index | archive | help


On Fri, 23 Apr 1999, Andy Angrick wrote:

> Sort of off topic...but....tar has been driving me a little crazy. I'm
> trying to create a cron job that backups webserver files and websites to a
> second drive in the middle of the night. I'm having a problem with the
> update feature (-u). It acts very strange.

Hi Andy,

I can't answer the tar question, as I have never used tar that way.
However, I recommend that you do something like below.  It will give you a
full backup every Sunday, and incrementals every day.  The incrementals
are named by the day of the week, so they overwrite the one from 7 days
ago.  The full backups do not overwrite older versions.

Alternatively, use dump, with its various dump levels.

Danny

----------------
#!/bin/sh
DOW=`date +%a`
cd /

if [ $DOW = "Sun" -o x$1 = xfull ]; then
        TIME=`date +%d-%b`   # 24-Apr
        NEWER=""
	echo $TIME > /var/db/backup.date
else
        TIME=$DOW
        NEWER="--newer `cat /var/db/backup.date`"
fi

tar $NEWER -z -c -f /backup/dir/WWW-${TIME}.tgz /usr/local/www 



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-isp" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.10.9904241103500.79604-100000>