RobertCo
08-30-2006, 05:47 PM
Hello,
First I would like to thank you all for the great wealth of information that I have found here and used in my use of NIX servers. :)
I have a server which I created an image of by using the following commands:
1.
dd if=/dev/zero of=/tmp/zero bs=64k zero out free space
2.
dd if=/dev/zero of=/home/zero bs=64k because /home is largest partition on server wanted to make sure I compressed well there as well.
3.
dd if=/dev/sda bs64k | gzip -9 >/remotemnt/testimage/test1.img.gz
Create the image compressed.
The size of the image compressed is 606250630 Aug 28 17:48 test1.img.gz Fairly large since the drives are 250GB
So not to endure network slowness by restoring the image via network I have copied the compressed image to a CD as well as a USB Flashdrive.
I am attempting to use the FlashDrive to restore the image.
---------------------------------
now for the restore process.
1. Boot knoppix Live cd with bot option knoppix 2 text mode only
2. I make sure that the disk is not being used for anything including swap
swapon -s
swapoff /dev/sdaX
umount /dev/sdaX
3.
mkdir /mnt/usb
4.
mount /dev/sdbX /mnt/usb
Mounts USB so I can read it to sbdX ususally /dev/sbd1 if I boot initially and then plug usb in.
5.
gzip -d /mnt/usb/test1.img.gz |dd of=/dev/sda bs=64k
This is failing due to not enough space on device.
I am thinking this is because gzip wants to uncompress the image on the usb device which only has 1 GB of space of which is already more then 58% used due to the image file being compressed there.
Is there a way I can uncompress the image and not have it write it to the usb device or the disk where it is going to be restored to ?
possibly a loop device ?
If so can you please show me how ?
Thank you very much as I am a Noob to SysAdmin responsibilities
:D
First I would like to thank you all for the great wealth of information that I have found here and used in my use of NIX servers. :)
I have a server which I created an image of by using the following commands:
1.
dd if=/dev/zero of=/tmp/zero bs=64k zero out free space
2.
dd if=/dev/zero of=/home/zero bs=64k because /home is largest partition on server wanted to make sure I compressed well there as well.
3.
dd if=/dev/sda bs64k | gzip -9 >/remotemnt/testimage/test1.img.gz
Create the image compressed.
The size of the image compressed is 606250630 Aug 28 17:48 test1.img.gz Fairly large since the drives are 250GB
So not to endure network slowness by restoring the image via network I have copied the compressed image to a CD as well as a USB Flashdrive.
I am attempting to use the FlashDrive to restore the image.
---------------------------------
now for the restore process.
1. Boot knoppix Live cd with bot option knoppix 2 text mode only
2. I make sure that the disk is not being used for anything including swap
swapon -s
swapoff /dev/sdaX
umount /dev/sdaX
3.
mkdir /mnt/usb
4.
mount /dev/sdbX /mnt/usb
Mounts USB so I can read it to sbdX ususally /dev/sbd1 if I boot initially and then plug usb in.
5.
gzip -d /mnt/usb/test1.img.gz |dd of=/dev/sda bs=64k
This is failing due to not enough space on device.
I am thinking this is because gzip wants to uncompress the image on the usb device which only has 1 GB of space of which is already more then 58% used due to the image file being compressed there.
Is there a way I can uncompress the image and not have it write it to the usb device or the disk where it is going to be restored to ?
possibly a loop device ?
If so can you please show me how ?
Thank you very much as I am a Noob to SysAdmin responsibilities
:D