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 Message-ID: <19971103074838.HP19395@uriah.heep.sax.de> In-Reply-To: <Pine.BSF.3.95.971029145727.9219D-100000@current1.whistle.com>; from Julian Elischer on Oct 29, 1997 15:15:07 -0800 References: <Pine.BSF.3.96.971029173051.6333A-100000@server.local.sunyit.edu> <Pine.BSF.3.95.971029145727.9219D-100000@current1.whistle.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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. ;-)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19971103074838.HP19395>