From owner-freebsd-questions Fri Mar 2 21:34:28 2001 Delivered-To: freebsd-questions@freebsd.org Received: from mail.freebsd-corp-net-guide.com (mail.freebsd-corp-net-guide.com [206.29.169.15]) by hub.freebsd.org (Postfix) with ESMTP id E52FE37B71A for ; Fri, 2 Mar 2001 21:34:24 -0800 (PST) (envelope-from tedm@toybox.placo.com) Received: from tedm.placo.com (nat-rtr.freebsd-corp-net-guide.com [206.29.168.154]) by mail.freebsd-corp-net-guide.com (8.11.1/8.11.1) with SMTP id f235YCN11728; Fri, 2 Mar 2001 21:34:13 -0800 (PST) (envelope-from tedm@toybox.placo.com) From: "Ted Mittelstaedt" To: "Richard G. Duvall" Cc: Subject: RE: Backup tape issue Date: Fri, 2 Mar 2001 21:34:12 -0800 Message-ID: <000401c0a3a3$93cf3180$1401a8c0@tedm.placo.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook 8.5, Build 4.71.2173.0 In-Reply-To: X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3155.0 Importance: Normal Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG >-----Original Message----- >From: owner-freebsd-questions@FreeBSD.ORG >[mailto:owner-freebsd-questions@FreeBSD.ORG]On Behalf Of Richard G. >Duvall >Sent: Saturday, March 03, 2001 12:48 AM >To: freebsd-questions@FreeBSD.ORG >Subject: Backup tape issue > > >My supervisor would like me to implement a tape backup solution at the >office to back up our 2 unix servers. We have a DNS server and a web >server. We want to put a DDS4 tape drive in the web server, and an extra >hard drive as a dump drive. We will be backing up both systems to the >DDS4. I have chosen to use Amanda to do this for us. > >With that all said, he would like to be able to put ANY tape in the drive >and have it succeed, basicly ignoring the tape lables. Then you probably don't want to use Amanda. Here's what I do: Once a month I do a full system backup with tar and put that tape away. The remaining days of the month I just run tar from a cronjob and rsh the results over to the system with the tapedrive. Here's an example of the script run on a remote server that doesen't have a tapedrive, the tapedrive is on foo.example.net: #!/bin/sh cd / rm /backupdaily.log date > /backupdaily.log rsh foo.example.net mt -f /dev/nrst0 status >> /backupdaily.log rsh foo.example.net mt -f /dev/nrst0 rewind >> /backupdaily.log rsh foo.example.net mt -f /dev/nrst0 weof 1 >> /backupdaily.log rsh foo.example.net mt -f /dev/nrst0 rewind >> /backupdaily.log TAPE=foo.example.net:/dev/nrst0 export TAPE tar cvX /tarexclude /usr/local/accounting/mysql/var/flcdba.backup >> /backupdaily.log tar cvX /tarexclude /usr/local/accounting/statements >> /backupdaily.log tar cvX /tarexclude /usr/local/accounting/logs >> /backupdaily.log tar cvX /tarexclude /usr/local/accounting/cclogs >> /backupdaily.log rsh foo.example.net mt -f /dev/nrst0 rewind >> /backupdaily.log tar -d > /tardailyerrors tar -d > /tardailyerrors tar -d > /tardailyerrors tar -d > /tardailyerrors date >> /backupdaily.log echo "Tape change needed" | mail -s Accounting\ daily\ backup\ completed foo@example.net In other words, he >want's it so that there will be a backup every day, but the people who >come in and don't know anything about the system will be able to just put >any tape in the drive rather than having to worry about puting them in any >specific order (like tape 1 monday, 2 tuesday, 3 wednesday, but not.) > That's what this script does. If someone forgets to change a tape then the prior day's backup is lost, so you lose one day, who cares. You could make this more elaborate so that you could fit mutiple days on a single tape, in case you forgot to change a tape. The one thing, though, is that the tapes that have been backed up, well you need to keep some order, otherwise if your just overwriting tapes willy-nilly then if you need to restore then your in trouble. Note that use of any of the "r" utilities is insecure - some people would substitute ssh but I just have the servers behind a firewall. Ted Mittelstaedt tedm@toybox.placo.com Author of: The FreeBSD Corporate Networker's Guide Book website: http://www.freebsd-corp-net-guide.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message