From owner-freebsd-questions@FreeBSD.ORG Mon Sep 1 08:35:54 2003 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3928516A4BF for ; Mon, 1 Sep 2003 08:35:54 -0700 (PDT) Received: from webserver.get-linux.org (adsl-64-161-78-226.dsl.lsan03.pacbell.net [64.161.78.226]) by mx1.FreeBSD.org (Postfix) with SMTP id 4932B43F75 for ; Mon, 1 Sep 2003 08:35:53 -0700 (PDT) (envelope-from oremanj@webserver.get-linux.org) Received: (qmail 18909 invoked by uid 1000); 1 Sep 2003 15:38:03 -0000 Date: Mon, 1 Sep 2003 08:38:03 -0700 From: Joshua Oreman To: Michael Alestock Message-ID: <20030901153803.GB18845@webserver> References: <200309011015.09771.michaela@maa-net.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200309011015.09771.michaela@maa-net.net> User-Agent: Mutt/1.4.1i cc: questions@freebsd.org Subject: Re: Dump X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Sep 2003 15:35:54 -0000 On Mon, Sep 01, 2003 at 10:15:08AM -0400 or thereabouts, Michael Alestock wrote: > I had a question.... > > I have 4 filesystems that I want to dump(8) to my SCSI Tape backup drive > (Travan 4GB uncompressed). The filesystems are, "/", "/usr", "/var", and > "/usr/home." All four filesystems equal about 2.5Gigs of data. > > I dumped the first filesystem "/" by executing, "dump -0uf /dev/sa0 / " > ....then executed, "mt -f /dev/sa0 eom" to move the tape to the end of the > backup (to append to the tape), then dumped the second filesystem (/usr) > using,"dump -0uf /dev/sa0 /usr". Then once again I executed, "mt -f > /dev/sa0" to move the tape to the end (to append to it). > > When I go to execute, "restore -if /dev/sa0" to confirm that both filesystems > were saved so far, there's only ONE filesystem saved to the tape "/". I > can't 'cd' to /var because it's not on the tape. What am I doing wrong??? I > know I still have plenty of tape left to save other filesystems, but it's not > dumping anything after the first filesystem. > > Any ideas as to what I'm doing wrong?? First, no need to run eom. So backup goes like this: # for FS in / /usr /usr/home /var; do > dump -0uf /dev/sa0 $FS > done && mt -f /dev/sa0 rewind To restore, you have to skip the tape to the correct position (read up on mt fsf). Then you can run `restore if /dev/sa0' to get files from *THAT PARTITION ONLY*. So if you wanted to restore a file in / but not /var or /usr (assuming rewound tape), do: # restore -if /dev/sa0 like you tried. To restore a file on /usr (assuming above order) on a rewound tape, do: # mt -f /dev/sa0 fsf # restore -if /dev/sa0 To restore a file on /usr/home, rewound tape, do `fsf 2'. To restore a file on /var and rewound tape, use `fsf 3'. To rewind the tape: # mt -f /dev/sa0 rewind It may be useful to keep a catalog as the first file on the tape. So you might want to do something like this before a backup of multiple file systems on one tape: # mt -f /dev/sa0 erase # CAREFUL! this erases previous backup! # dd of=/dev/sa0 < # mt -f /dev/sa0 fsf 3 # cd /usr/home # restore if /dev/sa0 Note that when restoring a file system other than /, paths are relative to the root of that filesystem. So, for example, if you're restoring from /usr backup, then /usr/X11R6 is actually /X11R6. /home will be there, but empty (it's a mount point). Also, in the above catalog, file numbers really start at 1; I was simplifying it so it would be easy to see exactly what you need to give to mt. -- Josh > > > Thanks, > > >>> Michael > > > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"