* Remote backup using tar?
@ 1993-07-25 22:08 Ed Jones
1993-07-26 2:26 ` Johannes Grosen
` (2 more replies)
0 siblings, 3 replies; 11+ messages in thread
From: Ed Jones @ 1993-07-25 22:08 UTC (permalink / raw)
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.
--
****************************************************************************
* Ed Jones | ejones@desire.wright.edu *
* Department of Psychology | ejones@sdl.psych.wright.edu *
* Signal Detection Lab | ejones@wsu (Bitnet) *
* Wright State University | *
****************************************************************************
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Remote backup using tar?
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
1993-07-26 15:15 ` Maarten Carels
2 siblings, 1 reply; 11+ messages in thread
From: Johannes Grosen @ 1993-07-26 2:26 UTC (permalink / raw)
Ed Jones (ejones@desire.wright.edu) wrote:
: 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.
: --
I suppose that there are several ways to do this. I would suggest that
you take the path of least resistance and greatest reliability and
check out gnutar. GNU's tar can communicate with `rmt' meaning you
can do something like `tar cvf <tapehost>:/dev/nrmt? /usr'. You can
find it in ~pub/gnu on prep.ai.mit.edu.
: ****************************************************************************
: * Ed Jones | ejones@desire.wright.edu *
: * Department of Psychology | ejones@sdl.psych.wright.edu *
: * Signal Detection Lab | ejones@wsu (Bitnet) *
: * Wright State University | *
: ****************************************************************************
--
Johannes Grosen grosen@argv.cs.ndsu.nodak.edu
System Administrator
Intelligent Systems Cluster, Room 244 IACC Building
North Dakota State University, Fargo, ND USA 51805 (701) 237-8282
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Remote backup using tar?
1993-07-26 2:26 ` Johannes Grosen
@ 1993-07-26 12:49 ` Kevin McElearney
0 siblings, 0 replies; 11+ messages in thread
From: Kevin McElearney @ 1993-07-26 12:49 UTC (permalink / raw)
In article <CAr2s8.FIp@ns1.nodak.edu>, grosen@cs.ndsu.nodak.edu (Johannes Grosen) writes:
|> Ed Jones (ejones@desire.wright.edu) wrote:
|> : 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.
Gnu tar is the best way to do this; however, you can also:
Dump /usr to dumphost:
tar cvf - /usr | rsh dumphost "dd of=/dev/nrst1 bs=20b"
Restore /usr from dumphost:
rsh dumphost "dd if=/dev/nrst1 ibs=20b" | tar xvBpf -
--
Kevin McElearney
| Is there really such a thing as
MIT Lincoln Laboratory | gravity, or does the earth just
244 Wood Street | suck?
Lexington, MA 02173-9108
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Remote backup using tar?
1993-07-25 22:08 Remote backup using tar? Ed Jones
1993-07-26 2:26 ` Johannes Grosen
@ 1993-07-26 13:23 ` Marcus J. Ranum
1993-07-26 15:49 ` Sybertz Marc
1993-07-27 14:27 ` Leslie Mikesell
1993-07-26 15:15 ` Maarten Carels
2 siblings, 2 replies; 11+ messages in thread
From: Marcus J. Ranum @ 1993-07-26 13:23 UTC (permalink / raw)
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
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Remote backup using tar?
1993-07-25 22:08 Remote backup using tar? Ed Jones
1993-07-26 2:26 ` Johannes Grosen
1993-07-26 13:23 ` Marcus J. Ranum
@ 1993-07-26 15:15 ` Maarten Carels
1993-07-26 22:54 ` Richard Todd
` (3 more replies)
2 siblings, 4 replies; 11+ messages in thread
From: Maarten Carels @ 1993-07-26 15:15 UTC (permalink / raw)
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.
[ ... several followups about gnu tar...]
One small thing to remember is that tar reads and writes the files it copies
byte by byte (or buffer by buffer). This means that:
1. tar can't cope with special files (devices and the like)
2. tar copies files with holes as files with the holes filled up with 0 bytes.
This makes tar (IMHO) unsuitable for backup. Use dump instead (rdump can write
to a tapeunit on another host).
With respect to 2, imagine one user makes a file by creating it, seeking to
some very large position, and writing only one byte there. If you backup
that file with tar, I guess that after writing several tapes full you'll
know what I mean. I know it was that hard to explain that tar is not a backup
program at at least one site, where a user actually did this. When there were
many more tapes written than possibly could have been on the disk, the
system administrator started to understand...
--maarten
--
In real life: Maarten Carels
Computer Science Department
University of Amsterdam
email: maarten@fwi.uva.nl
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Remote backup using tar?
1993-07-26 13:23 ` Marcus J. Ranum
@ 1993-07-26 15:49 ` Sybertz Marc
1993-07-27 14:27 ` Leslie Mikesell
1 sibling, 0 replies; 11+ messages in thread
From: Sybertz Marc @ 1993-07-26 15:49 UTC (permalink / raw)
>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.
You may also have a look to DECnsr layered product. It allows you to make the
backup of a lot of different Unix implementations (SunOS, HP-UX, AIX, ...) and
even PC running DOS.
Regards,
Marc Sybertz.
+-+-+-+-+-+-+-+ Marc Sybertz - Open System Support Unit Group - Brussels - BRO
|d|i|g|i|t|a|l| Marc.Sybertz@bro.mts.dec.com - "Marc Sybertz@BRO" - 856 / 7572
+-+-+-+-+-+-+-+ Rue de l'Aeronef,1 , 1140 Brussels , Belgium - +32 2 729.75.72
All opinions are mine, not DIGITAL's
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Remote backup using tar?
1993-07-26 15:15 ` Maarten Carels
@ 1993-07-26 22:54 ` Richard Todd
1993-07-27 14:51 ` Leslie Mikesell
` (2 subsequent siblings)
3 siblings, 0 replies; 11+ messages in thread
From: Richard Todd @ 1993-07-26 22:54 UTC (permalink / raw)
maarten@fwi.uva.nl (Maarten Carels) writes:
>[ ... several followups about gnu tar...]
>One small thing to remember is that tar reads and writes the files it copies
>byte by byte (or buffer by buffer). This means that:
>1. tar can't cope with special files (devices and the like)
Standard tar can't. GNU Tar can, and has ever since it was John Gilmore's
"pdtar" way back in the late 1980s.
>2. tar copies files with holes as files with the holes filled up with 0 bytes.
More recent GNU Tar releases support the 'sparse' option for making some
effort to handle this. But you are right that in general there's no way to
make an *exact* copy of a holey file with the holes in the same places as the
original without going behind the back of the filesystem code. Whether
this is a big problem for you, you'll have to decide for yourself.
Another, more serious (IMHO) problem with tar-based backups is that they
reset the access time on all the files that get backed up, which makes it
substantially more difficult to determine when files have been left unused
for a long time (and thus are likely candidates for permanent removal to
tape etc.)
--
Richard Todd rmtodd@mailhost.ecn.uoknor.edu rmtodd@chinet.chi.il.us
rmtodd@servalan.uucp New Improved Domain: rmtodd@servalan.servalan.com
"...the phrase 'Open Systems' makes me think of sucking chest wounds."-P.daSilva
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Remote backup using tar?
1993-07-26 13:23 ` Marcus J. Ranum
1993-07-26 15:49 ` Sybertz Marc
@ 1993-07-27 14:27 ` Leslie Mikesell
1 sibling, 0 replies; 11+ messages in thread
From: Leslie Mikesell @ 1993-07-27 14:27 UTC (permalink / raw)
In article <230lsm$d9l@sol.TIS.COM> mjr@tis.com (Marcus J. Ranum) writes:
>
> 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.
Note that just saving newer files won't save them in such a way that
a restore can correctly rebuild renamed directories and their contents.
GNUtar version 1.10 and up have a "listed-incremental" option that
keeps a file containing the timestamp of the previous run and a list
of all directories and their corresponding device and inode number.
Using this option you can be sure that all contents of renamed
and new directories are stored in an incremental.
Les Mikesell
les@chinet.com
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Remote backup using tar?
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
3 siblings, 0 replies; 11+ messages in thread
From: Leslie Mikesell @ 1993-07-27 14:51 UTC (permalink / raw)
In article <230seq$314@kubus.fwi.uva.nl> maarten@fwi.uva.nl (Maarten Carels) writes:
>[ ... several followups about gnu tar...]
>One small thing to remember is that tar reads and writes the files it copies
>byte by byte (or buffer by buffer). This means that:
>1. tar can't cope with special files (devices and the like)
>2. tar copies files with holes as files with the holes filled up with 0 bytes.
>This makes tar (IMHO) unsuitable for backup. Use dump instead (rdump can write
>to a tapeunit on another host).
Note that GNUtar solves both of these problems and a couple of others
that you didn't mention that would apply to other tar versions.
3. It can make sensible incrementals, catching renamed directories
(Version 1.10 and later)
4. It can restore incrementals with an option of deleting files that
did not exist at the time the incremental was taken (important if
you are trying to restore the machine to a particular state or if
you have several incrementals taken over a period of time).
The remaining problem is the lack of a decent manual describing how
and why to use the new features, but there are some sample scripts
included with the distribution.
Les Mikesell
les@chinet.com
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Remote backup using tar?
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
3 siblings, 0 replies; 11+ messages in thread
From: David Willmore @ 1993-07-28 19:41 UTC (permalink / raw)
maarten@fwi.uva.nl (Maarten Carels) writes:
>One small thing to remember is that tar reads and writes the files it copies
>byte by byte (or buffer by buffer). This means that:
>1. tar can't cope with special files (devices and the like)
>2. tar copies files with holes as files with the holes filled up with 0 bytes.
>This makes tar (IMHO) unsuitable for backup. Use dump instead (rdump can write
>to a tapeunit on another host).
>With respect to 2, imagine one user makes a file by creating it, seeking to
>some very large position, and writing only one byte there. If you backup
>that file with tar, I guess that after writing several tapes full you'll
>know what I mean. I know it was that hard to explain that tar is not a backup
>program at at least one site, where a user actually did this. When there were
>many more tapes written than possibly could have been on the disk, the
>system administrator started to understand...
It seems to me that a pass through 'compress' or 'gzip' would remove this
little problem. Depending on the speed of the machine, it could also speed
up your backup.
--
---------------------------------------------------------------------------
willmore@iastate.edu | "Death before dishonor" | "Better dead than greek" |
David Willmore | "Ever noticed how much they look like orchids? Lovely!" |
---------------------------------------------------------------------------
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Remote backup using tar?
1993-07-26 15:15 ` Maarten Carels
` (2 preceding siblings ...)
1993-07-28 19:41 ` David Willmore
@ 1993-08-03 17:07 ` Matthew B. Brookover
3 siblings, 0 replies; 11+ messages in thread
From: Matthew B. Brookover @ 1993-08-03 17:07 UTC (permalink / raw)
In article <230seq$314@kubus.fwi.uva.nl> maarten@fwi.uva.nl (Maarten Carels) writes:
>1. tar can't cope with special files (devices and the like)
>2. tar copies files with holes as files with the holes filled up with 0 bytes.
>
>This makes tar (IMHO) unsuitable for backup. Use dump instead (rdump can write
>to a tapeunit on another host).
>
>With respect to 2, imagine one user makes a file by creating it, seeking to
>some very large position, and writing only one byte there. If you backup
>that file with tar, I guess that after writing several tapes full you'll
>know what I mean. I know it was that hard to explain that tar is not a backup
>program at at least one site, where a user actually did this. When there were
>many more tapes written than possibly could have been on the disk, the
>system administrator started to understand...
Actually, there seem to be a number of problems with a number of
backup/archive tools. I suggest you track down a copy of the Usenix
LISA V Conference proceedings from September 1991. On Page 181, there
is a paper titled "Torture-testing Backup and Archive Programs: Things
You Ought to Know But Probably Would Rather Not" by Elizabeth Zwicky.
The torture test utilities are on ftp.erg.sri.com in pub/lisaV/torture.
I think a copy of the paper is there also.
--
Matthew B. Brookover
Computing and Information Resources
University of Denver
mbrookov@diana.cair.du.edu
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~1993-08-03 17:07 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox