From owner-freebsd-questions Mon Aug 25 02:06:53 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id CAA00644 for questions-outgoing; Mon, 25 Aug 1997 02:06:53 -0700 (PDT) Received: from nico.telstra.net (nico.telstra.net [139.130.204.16]) by hub.freebsd.org (8.8.7/8.8.7) with SMTP id CAA00639 for ; Mon, 25 Aug 1997 02:06:49 -0700 (PDT) Received: from freebie.lemis.com (freebie.lemis.com [192.109.197.137]) by nico.telstra.net (8.6.10/8.6.10) with ESMTP id TAA23477; Mon, 25 Aug 1997 19:06:15 +1000 Received: (grog@localhost) by freebie.lemis.com (8.8.7/8.6.12) id SAA00745; Mon, 25 Aug 1997 18:36:14 +0930 (CST) Message-ID: <19970825183614.02865@lemis.com> Date: Mon, 25 Aug 1997 18:36:14 +0930 From: Greg Lehey To: =?iso-8859-1?Q?Dott=2E_Davide_Tom=E8?= Cc: FreeBSD Questions Subject: Re: multiple backup on one tape References: <199708250808.KAA17675@dante.iol.it> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 X-Mailer: Mutt 0.81e 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_+0200?= Organisation: LEMIS, PO Box 460, Echunga SA 5153, Australia Phone: +61-8-8388-8250 Fax: +61-8-8388-8250 Mobile: +61-41-739-7062 WWW-Home-Page: http://www.lemis.com/~grog Fight-Spam-Now: http://www.cauce.org X-MIME-Autoconverted: from 8bit to quoted-printable by freebie.lemis.com id SAA00745 Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by hub.freebsd.org id CAA00640 Sender: owner-freebsd-questions@FreeBSD.org X-Loop: FreeBSD.org Precedence: bulk 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