Type the following to pick up dhcp address
dhclient
I used a samba share to hold my backups. Yes, there are other options...
mount -t cifs -o username=admin,password=supersecretpasswd //192.168.100.100/Share /mnt/backup
Change to mounted share and create server-specific folder
cd /mnt/backup
mkdir Server1_Backup
cd Server1_Backup
Now we're going to backup the partition table.
pvscan
sfdisk -d /dev/sda > ./ptable.sda
Activate our LVM's
vgchange -ay
Now we want to copy the info on our Physical Volumes
pvdisplay > ./pvdisplay.txt
Now if we list /dev/mapper we should see our VolGroups
ls -l /dev/mapper ##to show VolGroups
Next we want to backup the LVM configuration data (this needs to be performed for each VolGroup if there ar
more than 1)
vgcfgbackup -d -v VolGroup00 --file ./VolGroup00.lvm.backup
Now it's time to backup the boot partition, as well as the main VolGroup
partimage -d -b -z0 save /dev/sda1 ./sda1.img
partimage -d -M -b -z0 save /dev/mapper/VolGroup00-LogVol00 ./VolGroup00-LogVol00.img
## Do this for each LogVol listed
## Swap won't copy
If you're interested in the parameters, you can find them in the man pages
Now we need to backup the Master Boot Record
dd if=/dev/sda of=/mnt/nas/Wiki_DB/mbr.backup bs=512 count=1
I also like to have a copy of the following: