From owner-freebsd-questions@FreeBSD.ORG Sat Oct 17 02:43:27 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 86343106566C for ; Sat, 17 Oct 2009 02:43:27 +0000 (UTC) (envelope-from tajudd@gmail.com) Received: from mail-yx0-f171.google.com (mail-yx0-f171.google.com [209.85.210.171]) by mx1.freebsd.org (Postfix) with ESMTP id 42CF88FC0C for ; Sat, 17 Oct 2009 02:43:27 +0000 (UTC) Received: by yxe1 with SMTP id 1so2387966yxe.3 for ; Fri, 16 Oct 2009 19:43:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=cx/A6JzdjvuU+kEuaTH5AlNbUzxFhrtsW2uhiCDx4o4=; b=Ic+yM6ToWE3JaCSIWE8Pk1GuvUC17fKbyYB+gbgQBDMBr+DtLeUhDYAl2kry9PM52W lYBlqzA5lbiniw/Qc69tyMp8k8lpZVB5JfYjgkwk8u6uB6cSJwhGBK+8nOhaRRk5bgtZ ESN25CV0tMSmGwaglsAvq+fAdXo8tjgzhyN5U= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=E6YmLxQEiLYwSBGugGKsLQLx870LdSw0LMulDM747DeDRJVIZOSCKHEV3zI+56E+Na dBIcHbYOtO2YfjlybskBiXJzBOf5fgNpH7KB5g4dfuOxjCo9u3l6iE+gBFRVmZXbAaqT QmsjFbQSw6ZD01MEcXwaJUHJZrHOPAMmGMIOk= MIME-Version: 1.0 Received: by 10.101.95.6 with SMTP id x6mr2790627anl.108.1255747406734; Fri, 16 Oct 2009 19:43:26 -0700 (PDT) In-Reply-To: <20091016213732.GA61433@gizmo.acns.msu.edu> References: <1255727601.4640.4.camel@x1-6-00-11-09-00-e4-00.search.b.superkabel.de> <20091016213732.GA61433@gizmo.acns.msu.edu> Date: Fri, 16 Oct 2009 20:43:26 -0600 Message-ID: From: Tim Judd To: Jerry McAllister Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-questions@freebsd.org Subject: Re: small question about tape-based dumps X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Oct 2009 02:43:27 -0000 Replies inline On 10/16/09, Jerry McAllister wrote: > On Fri, Oct 16, 2009 at 11:13:21PM +0200, Stevan Tiefert wrote: > >> Hello list, >> >> one example: If I have three partitions and I want to backup every day >> these partitions, will I need 21 tapes? >> >> I ask because it seems it is not possible to place more than one dump on >> one tape, isn't it? > > You can easily put more than one dump on a tape if there is > room enough for them. Check out the mt(1) command. > > Something like mt fsf 1 will skip over the first dump file > so you can write the second. mt fsf 2 will skip over two files, etc. > That is dump files, not files within the dump. Each dump of a > filesystem is one file. > > If you need to restore, it is just the same. The first dump is > the first file. The second dump is reached by skipping 1 file > with the mt command, etc. > > I actually rewind and skip between each dump of multiples made > to the same tape. I also use the no-rewind device for the tape. > > So first dump is: dump 0af /dev/nsa0 / I understand that this creates a dumpfile on nsa0, and as I understand tapes (which may be wrong, which I ask for clarification here).. To mark a end-of-file to be able to fast-forward/rewind, why can't you use: mt -f /dev/nsa0 weof It's description in mt(1) says it writes the end-of-file mark at current position > For second dump: mt -f /dev/nsa0 rewind > mt -f /dev/nsa0 fsf 1 > dump 0af /dev/nsa0 /usr So if we use weof, would the 2nd dump then be: dump 0af /dev/nsa0 /usr mt -f /dev/nsa0 weof > third mt -f /dev/nsa0 rewind > mt -f /dev/nsa0 fsf 2 > dump 0af /dev/nsa0 /var And 3rd: dump 0af /dev/nsa0 /var mt -f /dev/nsa0 weof > etc. > > when all done mt -f /dev/nsa0 rewind > mt -f /dev/nsa0 offline And I've never used offline, guess I'll start now. > I have this all in a script that also writes an index file > as the first file on the tape. > > Of course if you are doing a change dump the dump command is > going to look more like: > > dump 1af /dev/nsa0 > etc. > > ////jerry > >> >> With regards >> Stevan Tiefert Thanks for any input! --TJ