Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 2 Mar 2001 21:34:12 -0800
From:      "Ted Mittelstaedt" <tedm@toybox.placo.com>
To:        "Richard G. Duvall" <rick@coastsight.com>
Cc:        <freebsd-questions@freebsd.org>
Subject:   RE: Backup tape issue
Message-ID:  <000401c0a3a3$93cf3180$1401a8c0@tedm.placo.com>
In-Reply-To: <Pine.BSF.4.21.0103030047250.52133-100000@ns1.coastsight.com>

next in thread | previous in thread | raw e-mail | index | archive | help
>-----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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?000401c0a3a3$93cf3180$1401a8c0>