Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 25 Aug 1997 18:36:14 +0930
From:      Greg Lehey <grog@lemis.com>
To:        =?iso-8859-1?Q?Dott=2E_Davide_Tom=E8?= <dtome@iol.it>
Cc:        FreeBSD Questions <questions@FreeBSD.org>
Subject:   Re: multiple backup on one tape
Message-ID:  <19970825183614.02865@lemis.com>
In-Reply-To: =?iso-8859-1?Q?=3C199708250808=2EKAA17675=40dante=2Eiol=2Eit=3E=3B_from_?= =?iso-8859-1?Q?Dott=2E_Davide_Tom=E8_on_Mon=2C_Aug_25=2C_1997_at_10=3A12?= =?iso-8859-1?Q?=3A18AM_%2B0200?=
References:  <199708250808.KAA17675@dante.iol.it>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Aug 25, 1997 at 10:12:18AM +0200, Dott. Davide Tomè wrote:
> Hi,
> I'd like to know how can I have backups of different
> machines on the same tape with tar, and how to
> restore them.

Please don't send messages of this nature to -hackers.  That list is
for in-depth discussion of primarily programming issues.  The correct
list for questions like yours is (wait for it) -questions.  I'm
copying that list with this reply.

There are numerous ways of doing backups, both with and without tar.
The way I use is to make one backup per file system.  To do this, you
write to the non-rewinding device (typically /dev/nrst0).

To back up a remote system, you first need to decide whether to
initiate the backup from the remote system (the one with the file
system) or the local system (with the tape).  Since I back up multiple
systems onto one (DDS) tape, I initiate everything from the local
system.  

Next, you need to enable rsh for root.  Do this by putting the names
of the hosts in a file /root/.rhosts.  Make sure that the file belongs
to root and has permissions r--------.

For example, to back up my systems freebie (with the tape drive, and
file systems /, /usr, and /home) and allegro (without a tape drive,
with file systems /, /usr, /var, and /src) I could do:

1.  /root/.rhosts

freebie
allegro

2. Backup commands

#!/bin/sh
TAPE=/dev/nrst0 export TAPE
mt rewind
tar cl /
tar cl /usr
tar cl /home
rsh allegro tar cl - / | dd of=$TAPE bs=20b
rsh allegro tar cl - /usr | dd of=$TAPE bs=20b
rsh allegro tar cl - /var | dd of=$TAPE bs=20b
rsh allegro tar cl - /src | dd of=$TAPE bs=20b
mt offline

Greg



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19970825183614.02865>