From owner-freebsd-isp Fri Apr 23 18:21:36 1999 Delivered-To: freebsd-isp@freebsd.org Received: from enya.clari.net.au (enya.clari.net.au [203.8.14.116]) by hub.freebsd.org (Postfix) with ESMTP id D50A114BEE for ; Fri, 23 Apr 1999 18:21:29 -0700 (PDT) (envelope-from danny@enya.clari.net.au) Received: from localhost (danny@localhost) by enya.clari.net.au (8.9.2/8.8.7) with ESMTP id LAA72715; Sat, 24 Apr 1999 11:19:12 +1000 (EST) (envelope-from danny@enya.clari.net.au) Date: Sat, 24 Apr 1999 11:19:11 +1000 (EST) From: "Daniel O'Callaghan" To: Andy Angrick Cc: FreeBSD-ISP@FreeBSD.ORG Subject: Re: tar In-Reply-To: <1.5.4.32.19990423200448.00b94170@netdirect.net> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-isp@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org 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