PaulNM on 14 Jun 2008 08:27:05 -0700

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] utility to image a linux host?

Morgan Jones wrote:
> with dd it's theoretically very easy:
> dd if=/dev/sda of=/mnt/somewhere
> the filesystem mounted on /mnt/somewhere needs to have enough free space 
> to hold the entire contents of /dev/sda.  This won't help you create and 
> iso of course.
> It's funny that you asked about an iso because I came across this in my 
> searching:
> sysimage is a little more complex that I'd like: ie client-server and 
> focused around building an image server that can be used to create many 
> clients.  It is flarcreate and jumpstart all wrapped up in a custom 
> package..  It does seem to allow bare metal restores to a "golden image" 
> though which is very handy.
> -morgan
> Casey Bralla wrote:
>> I was literally opening my eMail client to post a very similar request.   
>> I've got Gentoo pretty well where I like it, but it's a booger to get it to 
>> here.  (Also takes a long time).  I'd like to create a ISO image of my hard 
>> drive so that if I ever want to go back to this stage, I just boot to the 
>> DVD, and presto, it's there.
>> How do you do this with dd?
>> On Saturday 14 June 2008 10:49:13 am Morgan Jones wrote:
>>> I was talking to a coworker recently about 'flarcreate,' a solaris
>>> utillity that creates an image of a system that can be used to re-create
>>> a system either manually or via Jumpstart.  It's very handy for
>>> re-creating production environments in test or taking an ad-hoc backup,
>>> say, before an upgrade.
>>> Does such a utility exist for Linux (RHEL/Debian/Ubuntu)?  I know it can
>>> be done with dd but I'm looking for error checking and some awareness of
>>> the filesystem.  In particular, flarcreate will not backup empty space
>>> and can be told to exclude paths.
>>> thanks,
>>> -morgan
Partimage can do all of that. I'm not sure about the exclude paths 
option, though.

 From :

Description: Partimage is a Linux utility which saves partitions having 
a supported filesystem to an image file. Most Linux and Windows 
filesystems are supported. The image file can be compressed with the 
gzip / bzip2 programs to save disk space, and they can be splitted into 
multiple files to be copied on CDs / DVDs, ... Partitions can also be 
saved across the network since version 0.6.0 using the partimage network 
support, or using Samba / NFS. If you don't want to install Partimage, 
you can download and burn SystemRescueCd. It's a livecd that allows to 
use Partimage immediately even if your computer has no operating system 
installed (useful to restore an image), and it allows to save an image 
on a DVD on the fly.

Partimage will only copy data from the used portions of the partition. 
For speed and efficiency, free blocks are not written to the image file. 
This is unlike the 'dd' command, which also copies empty blocks. 
Partimage also works for large, very full partitions. For example, a 
full 1 GB partition can be compressed with gzip down to 400MB.

This is very useful to save partitions to an image in some cases:

     *  First you can restore your linux partition if there is a problem 
(virus, file system errors, manipulation error). When you have a 
problem, you just have to restore the partition, and after 10 minutes, 
you have the original partition. You can write the image to a CD-R if 
you don't want the image to use hard-disk space.
     * This utility can be used to install many identical computers. For 
example, if you buy 50 PCs, with the same hardware, and you want to 
install the same linux systems on all 50 PCs, you will save a lot of 
time. Indeed, you just have to install on the first PC and create an 
image from it. For the 49 others, you can use the image file and 
Partition Image's restore function.

Philadelphia Linux Users Group         --
Announcements -
General Discussion  --