Subsections


Disaster Recovery Using Bacula

General

When disaster strikes, you must have a plan, and you must have prepared in advance otherwise the work of recovering your system and your files will be considerably greater. For example, if you have not previously saved the partitioning information for your hard disk, how can you properly rebuild it if the disk must be replaced? Unfortunately, many of the steps one must take before and immediately after a disaster are very operating system dependent.

Bacula Systems provides special LinuxBMR and WinBMRpackages that largely automate and simplify recovery even with a very large number of machines. The documentation and details of these products are contained in separate white papers. If you need them, please ask your Bacula Systems sales representative.

Below are a few additional points that may or may not help.

Important Considerations

Here are a few important considerations concerning disaster recovery that you should take into account before a disaster strikes.

FreeBSD Bare Metal Recovery

The same basic techniques described above also apply to FreeBSD. Although we don't yet have a fully automated procedure, Alex Torres Molina has provided us with the following instructions with a few additions from Jesse Guardiani and Dan Langille:

  1. Boot with the FreeBSD installation disk
  2. Go to Custom, Partition and create your slices and go to Label and create the partitions that you want. Apply changes.
  3. Go to Fixit to start an emergency console.
  4. Create devs ad0 .. .. if they don't exist under /mnt2/dev (in my situation) with MAKEDEV. The device or devices you create depend on what hard drives you have. ad0 is your first ATA drive. da0 would by your firstSCSI drive. Under OS version 5 and greater, your device files are most likely automatically created for you.
  5. mkdir /mnt/disk
    

    this is the root of the new disk

  6. mount /mnt2/dev/ad0s1a /mnt/disk
    mount /mnt2/dev/ad0s1c /mnt/disk/var
    mount /mnt2/dev/ad0s1d /mnt/disk/usr
    .....
    
    The same hard drive issues as above apply here too. Note, under OS version 5 or higher, your disk devices may be in /dev not /mnt2/dev.
  7. Network configuration
    ifconfig xl0 ip/mask + route add default ip-gateway
    
  8. mkdir /mnt/disk/tmp
    
  9. cd /mnt/disk/tmp
    
  10. Copy bacula-fd and bacula-fd.conf to this path
  11. If you need to, use sftp to copy files, after which you must do this:
    ln -s /mnt2/usr/bin /usr/bin
    
  12. chmod u+x bacula-fd
    
  13. Modify bacula-fd.conf to fit this machine
  14. Copy /bin/sh to /mnt/disk, necessary for chroot
  15. Don't forget to put your bacula-dir's IP address and domain name in /mnt/disk/etc/hosts if it's not on a public net. Otherwise the FD on the machine you are restoring to won't be able to contact the SD and DIR on the remote machine.
  16. mkdir -p /mnt/disk/var/db/bacula
    
  17.   chroot /mnt/disk /tmp/bacula-fd -c /tmp/bacula-fd.conf
    
    to start bacula-fd
  18. Now you can go to bacula-dir and restore the job with the entire contents of the broken server.
  19. You must create /proc

Solaris Bare Metal Recovery

The same basic techniques described above apply to Solaris:

However, during the recovery phase, the boot and disk preparation procedures are different:

Once the disk is partitioned, formatted and mounted, you can continue with bringing up the network and reloading Bacula.

Preparing Solaris Before a Disaster

As mentioned above, before a disaster strikes, you should prepare the information needed in the case of problems. To do so, in the rescue/solaris subdirectory enter:

su
./getdiskinfo
./make_rescue_disk

The getdiskinfo script will, as in the case of Linux described above, create a subdirectory diskinfo containing the output from several system utilities. In addition, it will contain the output from the SysAudit program as described in Curtis Preston's book. This file diskinfo/sysaudit.bsi will contain the disk partitioning information that will allow you to manually follow the procedures in the _left_quote_Unix Backup & Recovery_right_quote_ book to repartition and format your hard disk. In addition, the getdiskinfo script will create a start_network script.

Once you have your disks repartitioned and formatted, do the following:



bsbuild 2024-02-12