|
Size: 1679
Comment:
|
Size: 3263
Comment:
|
| Deletions are marked like this. | Additions are marked like this. |
| Line 46: | Line 46: |
| {{{ After installation, edit the /etc/amanda/amanda-client.conf and change index_server and tape_server to gonzo.crecom.com.au }}} |
After installation, edit the /etc/amanda/amanda-client.conf and change index_server and tape_server to gonzo.crecom.com.au. Hash out the tapedev. |
| Line 52: | Line 51: |
| #tapedev "tape:/dev/YOUR-TAPE-DEVICE-HERE" # your tape device | |
| Line 58: | Line 58: |
| Back on your blank host. you are ready to restore. (as root) run: {{{ mkdir /u/restore cd /u/restore amrecover listhost sethost abe.crecom.com.au <--- choose a host to restore from above list setdisk / add . extract }}} Answer "Y" to all the questions. This will extract all your root partition files onto the /u partition since you can't just overwrite the root partition just yet. You will need to boot into the rescue CD to do that. If you have room on the /u partition (you should have plenty) proceed with the following. Otherwise, skip to the section that moves this to the root partition. lcd u setdisk /u <---- or other partitions add . extract This will restore all the other partitions. Next shutdown the server and boot the rescue CD. Choose not to search for previous installs and just get a shell. If your original server had raid, it might be a good idea to restore this, even if you only have one disk (check /u/restore/etc/fstab if there is md0 and/or md1 in it): First use fdisk to change type of partition to linux-raid (fd). If this is not aligned, we need to make sure it is aligned. {{{ mdadm --add /dev/md0 --raid-level=1 --devices=2 /dev/sda1 missing mkfs.ext3 /dev/md0 mkdir /mnt/sysimage mkdir /mnt/oldu mount /dev/md0 /mnt/sysimage mount /dev/sda3 /mnt/oldu cd /mnt/sysimage rsync -av ../oldu/restore/ ./ mount -obind /proc proc mount -obind /dev dev mount -obind /sys sys chroot /mnt/sysimage grub-install /dev/md0 }}} |
su - # goto superuser
Create recover directory and cd into it
amrecover
You get Amanda prompt - amrecover>
amrecover> listdisk - gives you available directories
amrecover> setdisk <disk>
amrecover>history - gives you days available
amrecover> setdate <date - as per history (cut & paste)>
amrecover>ls - gives avail directories
amrecover> add <directory or filename>
repeat selection process adding files required when done
amrecover>extract
will ask for confirmation
Bare metal recovery (abe example)
If unsure of how partition is done, you can re-do it later if you see the /etc/fstab. Otherwise, our standard is
1: / ext3 -- around 30GB 2: SWAP -- around 2GB 3: /u ext3 -- rest of the disk
.Then do a minimal text only server install (this will be blown away later and overwritten with contents of tape). Once machine is booted up, install amanda rpm. Go to our amanda backup machine (gonzo) and run:
rpm -qa|grep amanda
This will give you the version number you need. Amanda RPMs are available at http://www.zmanda.com/download-amanda.php
wget <paste URL of amanda RPM for red hat enterprise 5 of your version> rpm -ivh amanda-backup_client*.rpm
After installation, edit the /etc/amanda/amanda-client.conf and change index_server and tape_server to gonzo.crecom.com.au. Hash out the tapedev.
index_server "gonzo.crecom.com.au" # your amindexd server tape_server "gonzo.crecom.com.au" # your amidxtaped server #tapedev "tape:/dev/YOUR-TAPE-DEVICE-HERE" # your tape device
Next go to your amanda backup server (gonzo) and add your host to /var/lib/amanda/.amandahosts
test12.crecom.com.au root amindexd amidxtaped
Back on your blank host. you are ready to restore. (as root) run:
mkdir /u/restore cd /u/restore amrecover listhost sethost abe.crecom.com.au <--- choose a host to restore from above list setdisk / add . extract
Answer "Y" to all the questions. This will extract all your root partition files onto the /u partition since you can't just overwrite the root partition just yet. You will need to boot into the rescue CD to do that. If you have room on the /u partition (you should have plenty) proceed with the following. Otherwise, skip to the section that moves this to the root partition.
lcd u setdisk /u <
or other partitions add . extract
This will restore all the other partitions. Next shutdown the server and boot the rescue CD. Choose not to search for previous installs and just get a shell. If your original server had raid, it might be a good idea to restore this, even if you only have one disk (check /u/restore/etc/fstab if there is md0 and/or md1 in it):
First use fdisk to change type of partition to linux-raid (fd). If this is not aligned, we need to make sure it is aligned.
mdadm --add /dev/md0 --raid-level=1 --devices=2 /dev/sda1 missing mkfs.ext3 /dev/md0 mkdir /mnt/sysimage mkdir /mnt/oldu mount /dev/md0 /mnt/sysimage mount /dev/sda3 /mnt/oldu cd /mnt/sysimage rsync -av ../oldu/restore/ ./ mount -obind /proc proc mount -obind /dev dev mount -obind /sys sys chroot /mnt/sysimage grub-install /dev/md0
