From owner-freebsd-hackers Mon Nov 3 00:33:03 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id AAA17291 for hackers-outgoing; Mon, 3 Nov 1997 00:33:03 -0800 (PST) (envelope-from owner-freebsd-hackers) Received: from sax.sax.de (sax.sax.de [193.175.26.33]) by hub.freebsd.org (8.8.7/8.8.7) with SMTP id AAA17249 for ; Mon, 3 Nov 1997 00:32:52 -0800 (PST) (envelope-from j@uriah.heep.sax.de) Received: (from uucp@localhost) by sax.sax.de (8.6.12/8.6.12-s1) with UUCP id JAA01464; Mon, 3 Nov 1997 09:32:46 +0100 Received: (from j@localhost) by uriah.heep.sax.de (8.8.7/8.8.5) id HAA05365; Mon, 3 Nov 1997 07:48:38 +0100 (MET) Message-ID: <19971103074838.HP19395@uriah.heep.sax.de> Date: Mon, 3 Nov 1997 07:48:38 +0100 From: j@uriah.heep.sax.de (J Wunsch) To: freebsd-hackers@freebsd.org (FreeBSD hackers) Cc: gopu@global.com (Gopakumar H Pillai) Subject: Re: Help in data recovery References: X-Mailer: Mutt 0.60_p2-3,5,8-9 Mime-Version: 1.0 X-Phone: +49-351-2012 669 X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F 93 21 E0 7D F9 12 D6 4E Reply-To: joerg_wunsch@uriah.heep.sax.de (Joerg Wunsch) In-Reply-To: ; from Julian Elischer on Oct 29, 1997 15:15:07 -0800 Sender: owner-freebsd-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk As Julian Elischer wrote: > dd the entire drive as it stands now, onto a backup medium. > possibly the following might work: > dd if=/dev/rsd0 | gzip |dd of=/dev/rst0 The second dd command needs a `conv=sync', or it won't save the last compressed block. If your tape drive is larger than your sd0 drive, you might want to omit the gzip, while it does a great job in compressing, it's awfully slow so your tape will go start-stop. Also, the second gzip will do better with an `obs=16k', causing a variable-length recording tape drive (DAT, 8 mm, QIC >= 320 MB, DLT) to write larger blocks, thus being more effective. Note that you then need to specify `ibs=16k' then when reading the tape back. So, iff your tape capacity is larger than disk sd0: dd if=/dev/rsd0 of=/dev/rst0 bs=16k conv=sync If you need compression, the tool `team' (from the ports collection) will be a great help: dd if=/dev/rsd0 | gzip | team 1m 3 | dd of=/dev/rst0 obs=16k conv=sync (team tries the best to keep your tape streaming, this might save you an hour or two over the start-stop method.) > this will write on a 'plausible' disklabel. use fsck -b 32 /dev/rsd1a to > try get a backup superblock. if that doesn't work, you may need to find > where the next one is. (you should have gotten a list when you 'newfs'd > the drive in thes earlier step). Note that you can reproduce these numbers by re-running newfs on the filesystem in question, *but!* using the -N option. Except of the -N, you need to specify the very same parameters to newfs as you did when initially creating the filesystem. If you initially created the filesystem with sysinstall, it uses the options `-b 8192 -f 1024', so make this newfs -b 8192 -f 1024 -N /dev/rsd0s1e > (alternatively, > you could try: > fdisk -iu /dev/nrst0 Surely Julian didn't want you to run fdisk on a tape drive. :-) So just type `fdisk', and it will pick up the first disk for you. -- cheers, J"org joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE Never trust an operating system you don't have sources for. ;-)