Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
From: mjr@tis.com (Marcus J. Ranum)
Subject: Re: Remote backup using tar?
Date: 26 Jul 1993 13:23:34 GMT	[thread overview]
Message-ID: <230lsm$d9l@sol.TIS.COM> (raw)
In-Reply-To: 1993Jul25.170846.11585@desire.wright.edu

ejones@desire.wright.edu (Ed Jones) writes:
>I have several unix boxes, DEC3400s and DECstation 5200s, that I want
>to backup the file systems to an Exabyte 8mm drive on the DECstation.
>I want to use tar rather than dump. So, how do I do a backup of file systems
>on the Alpha to a tape drive on the DECstation using tar? Thanks
>for the help.

	Get gnu tar (on various FTP servers) and use it combined with
find.

	gnu tar's nice since you can specify a list of input files
to take. It also can talk to rmt(8) on remote machines, just like
rdump/rrestore. A trick I use for doing incrementals is to build a
file list using find -newer to get a list of files since the last
dump. I then prepend that to itself and use it as the dump index.
My backup script is appended below - it could be fancier but it
works. I use rmtwrite instead of gnu tar's built in rmt code because
I'm having it talk to a tape server on a different port, rather
than invoking rmt(8) via rsh.

mjr.
-----
#!/bin/sh
BIN=/usr/local/etc/backup

LOGS=/logs/backup
FEXT=`date +%m.%d.%y`
TAPE=hilo.tis.com:tape
LAST=$LOGS/lastdump

#we build a file containing a list of files to copy out.
#the first thing in that file is itself. heh.
rm -f $LOGS/files.$FEXT
echo $LOGS/files.$FEXT > $LOGS/files.$FEXT

# build the list
# default is to do everything that changed since yesterday
# if given a parameter, store everything (level 0 dump)
rm -f $LOGS/back.$$
if [ $# -eq 1 ] ; then
        find / -print >> $LOGS/files.$FEXT 2> $LOGS/back.$$
else
        find / -newer $LAST -print >> $LOGS/files.$FEXT 2> $LOGS/back.$$
fi

# dump the files now
$BIN/pdtar -D -c -v -f - -T $LOGS/files.$FEXT | \
        $BIN/rmtwrite -b 20480 -f $TAPE -p 7777 2> $LOGS/back.$$
if [ $? -ne 0 ]; then
        (
        echo "dump failed!"
        cat $LOGS/back.$$
        ) | /usr/ucb/mail -s dump root
        exit 1
fi

date > $LAST
compress -f $LOGS/files.$FEXT
rm -f $LOGS/back.$$
exit 0
-- 
C++ -> C   ::  cancer -> lung


  parent reply	other threads:[~1993-07-26 13:23 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1993-07-25 22:08 Remote backup using tar? Ed Jones
1993-07-26  2:26 ` Johannes Grosen
1993-07-26 12:49   ` Kevin McElearney
1993-07-26 13:23 ` Marcus J. Ranum [this message]
1993-07-26 15:49   ` Sybertz Marc
1993-07-27 14:27   ` Leslie Mikesell
1993-07-26 15:15 ` Maarten Carels
1993-07-26 22:54   ` Richard Todd
1993-07-27 14:51   ` Leslie Mikesell
1993-07-28 19:41   ` David Willmore
1993-08-03 17:07   ` Matthew B. Brookover
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox