From owner-freebsd-questions Wed Oct 23 06:55:54 1996 Return-Path: owner-questions Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id GAA17516 for questions-outgoing; Wed, 23 Oct 1996 06:55:54 -0700 (PDT) Received: from croute.com (ishm2.croute.com [199.97.106.1]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id GAA17511; Wed, 23 Oct 1996 06:55:51 -0700 (PDT) Received: from bldg1.croute.com by croute.com (4.1/SMI-4.1) id AA10805; Wed, 23 Oct 96 08:56:32 CDT Received: from COMPUROUTE/SpoolDir by bldg1.croute.com (Mercury 1.13); Wed, 23 Oct 96 8:55:49 +600 Received: from SpoolDir by COMPUROUTE (Mercury 1.13); Wed, 23 Oct 96 8:55:26 +600 From: "Larry Dolinar" Organization: CompuRoute, Inc. To: owner-questions@freebsd.org Date: Wed, 23 Oct 1996 08:55:24 +600 CDT Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7BIT Subject: Re: Questions re backing up Cc: freebsd-questions@freebsd.org X-Confirm-Reading-To: "Larry Dolinar" X-Pmrqc: 1 Priority: normal X-Mailer: Pegasus Mail v3.40 Message-Id: <115917B4734F@bldg1.croute.com> Sender: owner-questions@freebsd.org X-Loop: FreeBSD.org Precedence: bulk | From: Nadav Eiron | On Wed, 23 Oct 1996, Mikel Lindsaar wrote: | | > | > Being fairly new to FreeBSD (and Unix in general) I have now a need to set | > up a fairly comprehensive backup regieme. A simple tar to /der/rst0 is no | > longer suitable. | > | > I need to backup the following | > | > Now, I know I can go without /tmp and there is no need to backup /proc but | > I want to be able to backup the remaining systems to a single tape, with a | > rotating tape log (5 tapes over a week) | > | > I know I can use dump, but after digging through the man pages and the | > O'Rielly (God bless them) Sys Admin Bible I cannot see how to specify | > multiple filesystems in the single dump command. | > You can't; once upon a time Sun used to say you could use the 'c' partition of a drive (required to have the full geometry for Sun installs) but this has never proved reliable in my experience. In any case FreeBSD, similar as it is, doesn't work this way either. Below is a Cshell script I use for backing up the host which servers as our 'dumphost' for our CAD/CAM network. Target device is a Sony SDT-5000 4mm DAT drive. Due to this mailer (Pegasus on Novell), some lines are wrapped. As with all things Un*x, there are many ways to do the same thing. This one adapts to whatever FreeBSD box it finds itself on. Works for Sun as well. #!/bin/csh # # dumpall: script to dump filesystems (FreeBSD) # awk script prints appropriate column from filesystem table as arg to 'dump' # -- only problem is that filesystems are dumped in order they're mounted # (may not be all bad) # # in SunOS 4.x case (BSD as well), filesystem table doesn't call out raw # device files, so second awk required to separate path components on '/' # so output can be reformatted to look like raw device names # mt -f /dev/st0ctl.0 blocksize 1024 set files = `awk '/^\/dev\/sd/ && $3 !~ /swap/ { printf( "%s\n", $1 ); }' /etc/fstab | awk 'BEGIN { FS="/" } /dev/ { printf( "/dev/r%s ", $3 ); }'` set tparms='0udsbf 61000 10240 126 /dev/nrst0' foreach fs ( $files ) dump $tparms $fs # echo dump $tparms $fs end # clean up and dismount mt -f /dev/nrst0 rewoffl | > I am currently backup up the /home tree with | > | > dump 0usfd 42500 /dev/rst0 5000 /dev/sd0s1e | | What should help you (if I understand ou correctly) is use the /dev/nrst0 | device. The difference is that it will not rewind when it finishes. This | will let you put another dump on the same tape right after the first one. Most definitely. This script (and use of /dev/nrst0 in general) will create what's sometimes called a stacked format. You get to subsequent dumps with either 'mt fsf' if doing multiple restores off the same tape, or the 's' parameter of restore (see the man pages for more info). hth, larry