Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 25 Feb 2000 19:14:56 -0800
From:      Alfred Perlstein <bright@wintelcom.net>
To:        Walter Brameld <brameld@twave.net>
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Mini-HOWTO Restoring from backups.
Message-ID:  <20000225191456.R21720@fw.wintelcom.net>
In-Reply-To: <00022521273800.02997@Bozo_3.BozoLand.domain>; from brameld@twave.net on Fri, Feb 25, 2000 at 09:20:40PM -0500
References:  <00022520010701.02808@Bozo_3.BozoLand.domain> <20000225175140.N21720@fw.wintelcom.net> <00022521273800.02997@Bozo_3.BozoLand.domain>

next in thread | previous in thread | raw e-mail | index | archive | help
* Walter Brameld <brameld@twave.net> [000225 18:57] wrote:
> On Fri, 25 Feb 2000, in a never-ending search for enlightenment, Alfred Perlstein wrote:
> > * Walter Brameld <brameld@twave.net> [000225 17:49] wrote:
> > >    I'm sure I am missing the boat here somewhere, but I can't seem to
> > > find any documentation as to how to restore my system in the event of
> > > a catastrophic failure. Both the Handbook and The Complete FreeBSD
> > > give some information as to how to back up data, but not how to do
> > > the above. To me this seems like a valuable piece of information to
> > > have on hand. 
> > > 
> > >    If anyone could point me to a source, I would appreciate it
> > 
> > I think the next step would be to restore the data?
> > 
> > I'm not sure exactly what you're asking here, if you have backups
> > then all you need to do is repartition and restore from the
> > backups.
> > 
> > Can you be more specific?
> > 
> > check out "man restore".
> > 
> > -Alfred
> 
> I did check out "man restore". I also checked "man disklabel", man newfs" and
> "man do I have a headache". 

wahahaha. :)  Yes, it's a bit rough on a newbie.

> I guess my point was, it would be nice to have a
> step-by-step procedure documented somewhere. Granted, all the information is
> available but it's not always easy for someone who is brand new to Unix/FreeBSD
> to put it all together on their own. That was the whole point in my purchasing
> something like The Complete FreeBSD. I understand the concept behind "RTFM"
> (Thanks for not saying it). The thing is, I thought I had bought TFM just for
> the purpose of R it. 

I guess the one of the more important things to have available besideds
your dumpfiles is your disk layout meaning the fdisk info and disklabel
info.

You can retrieve both by just running 'fdisk' and 'disklabel' with the
only argument being your disk name:

/home/bright/refined/src/paycounter/pctrackd # fdisk ad0    
******* Working on device /dev/rad0 *******
parameters extracted from in-core disklabel are:
cylinders=4962 heads=16 sectors/track=63 (1008 blks/cyl)

Figures below won't work with BIOS for partitions not in cyl 1
parameters to be used for BIOS calculations are:
cylinders=4962 heads=16 sectors/track=63 (1008 blks/cyl)

Media sector size is 512
Warning: BIOS sector numbering starts with sector 1
Information from DOS bootblock is:
The data for partition 1 is:
sysid 165,(FreeBSD/NetBSD/386BSD)
    start 63, size 5001633 (2442 Meg), flag 80 (active)
        beg: cyl 0/ sector 1/ head 1;
        end: cyl 1023/ sector 63/ head 15
The data for partition 2 is:
<UNUSED>
The data for partition 3 is:
<UNUSED>
The data for partition 4 is:
<UNUSED>

/home/bright/refined/src/paycounter/pctrackd # disklabel  ad0s1
# /dev/rad0c:
type: ESDI
disk: wd0s1
label: 
flags:
bytes/sector: 512
sectors/track: 63
tracks/cylinder: 16
sectors/cylinder: 1008
cylinders: 4961
sectors/unit: 5001633
rpm: 3600
interleave: 1
trackskew: 0
cylinderskew: 0
headswitch: 0           # milliseconds
track-to-track seek: 0  # milliseconds
drivedata: 0 

8 partitions:
#        size   offset    fstype   [fsize bsize bps/cpg]
  a:   245760        0    4.2BSD     1024  8192    16   # (Cyl.    0 - 243*)
  c:  5001633        0    unused        0     0         # (Cyl.    0 - 4961*)
  e:   614400   245760    4.2BSD     1024  8192    16   # (Cyl.  243*- 853*)
  f:  4141473   860160    4.2BSD     1024  8192    16   # (Cyl.  853*- 4961*)

Then you need to run "fdisk -i newdisk" and "disklabel -e newdisk" to
recreate something with enough space for your dumpfiles.

fdisk will prompt you to enter the parameters, and disklabel will bring
up an editor for you to enter in that information.

You should newfs the partitions, then using 'restore -r' is usually
the easiest (from the restore manpage):

     -r      Restore (rebuild a file system).  The target file system should
             be made pristine with newfs(8),  mounted and the user cd'd  into
             the pristine file system before starting the restoration of the
             initial level 0 backup. If the level 0 restores successfully, the
             -r flag may be used to restore any necessary incremental backups
             on top of the level 0.  The -r flag precludes an interactive file
             extraction and can be detrimental to one's health if not used
             carefully (not to mention the disk). An example:

                   newfs /dev/rrp0g eagle
                   mount /dev/rp0g /mnt
                   cd /mnt

                   restore rf /dev/rst8

             Note that restore leaves a file restoresymtable in the root di-
             rectory to pass information between incremental restore passes.
             This file should be removed when the last incremental has been
             restored.

             Restore, in conjunction with newfs(8) and dump(8),  may be used
             to modify file system parameters such as size or block size.

hmm, i think RESTORE(8) needs to be updated re block devices...

anyhow... hope this helps,
-- 
-Alfred Perlstein - [bright@wintelcom.net|alfred@freebsd.org]


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000225191456.R21720>