After further review I am trying to run the following which I believe is working
I will update this thread once I complete my test to let you know if it all works smooth.Code:zcat /mnt/usb/test1.img.gz >/dev/sda
![]()
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.zero out free spaceCode:dd if=/dev/zero of=/tmp/zero bs=64k
2.because /home is largest partition on server wanted to make sure I compressed well there as well.Code:dd if=/dev/zero of=/home/zero bs=64k
3.Create the image compressed.Code:dd if=/dev/sda bs64k | gzip -9 >/remotemnt/testimage/test1.img.gz
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
Code:swapon -sCode:swapoff /dev/sdaX3.Code:umount /dev/sdaX4.Code:mkdir /mnt/usbMounts USB so I can read it to sbdX ususally /dev/sbd1 if I boot initially and then plug usb in.Code:mount /dev/sdbX /mnt/usb
5.This is failing due to not enough space on device.Code:gzip -d /mnt/usb/test1.img.gz |dd of=/dev/sda bs=64k
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
![]()
After further review I am trying to run the following which I believe is working
I will update this thread once I complete my test to let you know if it all works smooth.Code:zcat /mnt/usb/test1.img.gz >/dev/sda
![]()
this process worked great. Now I just have to duplicate the process and make sure I can use the knoppix Live CD to mount a network drive (which I am sure it will be able to do)![]()
You should use -c switch for gzip which will write the output to stdout, i.e.Originally Posted by RobertCo
Code:gzip -cd /mnt/usb/test1.img.gz |dd of=/dev/sda bs=64k

New Barebones Supermicro 5019D Server, 4C/8T Xeon D-2123T, 1U Rackmountable, 10G
$449.99
HP Proliant MicroServer Gen 8 2.23GHz Xeon 16GB RAM NO SSD
$249.99
HP ProLiant MicroServer Gen8 Tower Server Xeon E3-1220 v2 2.3GHz 16GB RAM
$289.99
Supermicro CSE-937 3U Storage Chassis No CPU No HDD No Ram Tested & Reset
$129.99
1U Edge Firewall Server X11SCW-F Xeon E-2174G 0 RAM M.2 NVME 3x PCI-e 2x PSU X
$175.00
Supermicro 5019D-4C-FN8TP Xeon D-2123IT (4C/8T) 64GB DDR4 10GbE 480GB 1U Server
$689.00
Supermicro SuperServer E300-15 - SYS-e300-9C - 16GB RAM 240GB Samsung SSD
$199.99
Supermicro 2U X10DRU-i 2x E5-2680 v3 2.5ghz 32gb Ram 240gb SSD 2x GPU *READ*
$369.99
Supermicro E300-12C Mini 1U Barebone X12SCV-LVDS LGA1200 SNK-P0073A4 w/ Adapter
$225.00
POGO ATLAS 1102 Server 32 Gb RAM 4TB Storage 2x2TB HDD’s (Tested-Working) No OS
$179.85