Updated compression section to use lzop instead of gzip.
1 parent 54daf5a commit 193db81f4cb02280cec5745e4e68e43524ea9036
@tundra tundra authored on 23 Aug 2014
Showing 1 changed file
View
16
baremetal.rst
 
 
:Author: Tim Daneliuk (tundra@tundraware.com)
 
:Version: ``$Id: baremetal.rst,v 1.121 2014/08/23 21:00:27 tundra Exp $``
:Version: ``$Id: baremetal.rst,v 1.122 2014/08/23 22:43:54 tundra Exp $``
 
 
Précis
------
compressing the output of ``dd`` on-the-fly. There's no reason to
bother doing this for the MBR, but for the actual data partitions,
it's worth a try. Replace the last two ``dd`` commands with::
 
dd if=/dev/sda1 | gzip >/shared/boot.dd.gz # Backup /boot
 
dd if=/dev/sda2 | gzip >/shared/root.dd.gz # Backup rootvg LVM (rest of OS)
dd if=/dev/sda1 | lzop >/shared/boot.dd.gz # Backup /boot
 
dd if=/dev/sda2 | lzop >/shared/root.dd.gz # Backup rootvg LVM (rest of OS)
 
 
 
Restore Procedure
mount nas1:/shared /shared # Mount shared storage
 
dd if=/dev/zero of=/dev/sda bs=512 count=10 # Nuke any old boot/partion info on the disk
 
partprobe /dev/sda # Reread the partition table into the kernel
 
sfdisk /dev/sda </shared/ptbl # Restore the partition table
 
dd if=/shared/MBR of=/dev/sda bs=512 count=1 # Restore the Master Boot Record
 
 
If you backed up using compression, then the last two ``dd`` commands
will be::
 
dd if=/shared/boot.dd.gz | gunzip >/dev/sda1 # Restore /boot
 
dd if=/shared/root.dd.gz | gunzip >/dev/sda2 # Restore rootvg LVM (rest of OS)
dd if=/shared/boot.dd.gz | lzop -d >/dev/sda1 # Restore /boot
 
dd if=/shared/root.dd.gz | lzop -d >/dev/sda2 # Restore rootvg LVM (rest of OS)
 
 
Restoring To A Different Sized Drive
------------------------------------