Veritas-bu

[Veritas-bu] Full system restore

2003-09-21 14:40:54
Subject: [Veritas-bu] Full system restore
From: larry.kingery AT veritas DOT com (Larry Kingery)
Date: Sun, 21 Sep 2003 14:40:54 -0400 (EDT)
> I have never done a full system restore.  We are running NetBackup
> DataCenter 4.5 on Solaris (Media and Master Server on same system).
> The system I'm recovering is Redhat Linux 2.4.  We're installing the
> OS, then NBU, then start the restore.  If I restore everything with
> the 'do not replace' option, will that get the system back to what
> it was.  I tried with 'replace exiting files' and it doesn't work
> which makes sense to me.  I'm going to class next week but need help
> now.  Thanks. 

Cheryl,

It sounds like what you're trying to do is install the OS and then do
a restore over the top of it.  Generally that's not something that's
possible with a Unix(-like) system.

What you need to do is install OS/NBU somewhere that's not being
restored, repartition the original locations and make filesystems,
restore the data, possibly do some cleanup, and finally reinstall the
boot loader.

I recently did this on my laptop when changing hard drives.  In this
case, I only had one drive available (at a time), so I had to be a
little "clever" (I installed a copy of RH+NBU where my swap partition
would normally be, then restored the OS into the original locations).

There's a lot of ways to do this, depending on a number of factors.
This is how I did it with a single disk and keeping the filesystem
layout, etc, the same....




Partition the new drive with adequate filesystem space.

Install Linux on a "spare" partition.  If you have adequate memory to
run the install w/o swap (you probably do), you can use the partition
you're eventually going to use for swap.  Or choose a partition that
you can restore later (like /home).  You need enough of an OS to get
networking going.  The partition should have about 100MB free after
the install.  I used RH7.3 and selected only the networking package,
which claimed to need 386MB but only actually used 242MB.  You might
want to make sure this partition resides completely on cylinders less
than 1024, or use LBA mode or use GRUB as the boot loader (for the
moment at least). 

Add inetd/xinetd if it's not included during the install.  This step
will be optional in most cases.

If you will be initiating the restores on the client, add ncurses4. 

Install NBU client software.  If necessary, add additional options to
bp.conf.  If inetd or xinetd is not installed, start bpcd -standalone. 

Create a filesystem on what will be the root partition.  If you are
going to use a journalling filesystem and can enable it later doing so
may improve restore performance.  Mount the filesystem.

Use NBU to restore the root filesystem to the new mountpoint.  Make
sure to set "rename hard links" to yes and "rename soft links" to no.
Select the option to restore w/o crossing mount points.

Check the restored fstab file.  If the fstab references LABELs instead
of block devices, and you did not use the same label when creating the
new root filesystem, use tune2fs (or the equivalent for the filesystem
type) or edit the fstab.  Note the labels, if any, for the other
partitions on the root disk.

Create the remaining filesystems to be recovered, mount them in the
appropriate locations in the recovered root filesystem, and restore
them using the same options as above.

If you exclude certain things from backup, such as /tmp or /proc,
recreate them manually in the new root filesystem.


chroot into the new root filesystem.  Make a boot floppy (just in
case).  Reinstall the boot loader.  The following assumes you install
the boot loader in the MBR.  You may want to edit the configuration
file for you boot loader so that you can boot into the temporary Linux
root partition in case of problem.

  -  GRUB:  Identify the partition with the RESTORED GRUB
     configuration.  Set the root value to the correct disk.  Setup
     GRUB on the root disk.  It may help to remember that GRUB counts
     partitions from 0, while Linux counts from 1.

     grub> find /boot/grub/stage1
       (hd0,6)             
       (hd0,0)
     grub> root (hd0,0)
        Filesystem type is ext2fs, partition type 0x83
     grub> setup (hd0)
     
  - LILO:  If the disk has or is going to change locations, you may
    need to edit lilo.conf temporarily.

Drop out of the chroot shell and reboot into single user mode.
Dispose of the temporary install filesystem, probably by using either
mkswap or mkfs.  Bring the system up to the normal runlevel.  If
necessary, restore any remaining filesystems.




-- 
Larry Kingery 
TODO:

   Deal with existence of /boot separate from /
   

     If you're sufferring from insanity, you're doing it all wrong

<Prev in Thread] Current Thread [Next in Thread>