LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 01-27-2009, 06:17 PM   #1
bctechman
LQ Newbie
 
Registered: Jan 2009
Posts: 3

Rep: Reputation: 0
Best way to capture of image of linux computer


I've recently built an Ubuntu 8.10 box that I would like to make an image of so I don't have to rebuild it later. Normally I use a product called Altiris Deployment Solution to capture all my images, but it reports that it can't read the volume. I then looked at ghost but from what I can see Ghost doesn't like Linux either.

Wondering if anybody could recommend a product that I could to capture/restore images of linux os's?

Thanks
 
Old 01-27-2009, 06:40 PM   #2
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Mineral, Virginia
Distribution: Debian 8
Posts: 7,893

Rep: Reputation: 339Reputation: 339Reputation: 339Reputation: 339
Rather than use image copies I recommend that you set up a backup system based on using the cp, rsynch, or tar commands.

I suggest that you look at the cp command with the update option. Update means to only back up the files which have changed since the previous backup. If you use cp -a to do your backups then the first backup will be a complete filesystem copy. Subsequent backups will be only the files which have changed since the previous backup.

http://linux.die.net/man/1/cp

You can use rsynch in a similar manner to using cp to make either local or remote backups:

http://linux.die.net/man/1/rsync

If you are short of backup space then you can use tar to compress your backups.

http://www.gnu.org/software/tar/manual/tar.html

These 3 programs avoid some of the common problems with image copies which include:

Image copies copy the entire partition including free space. This takes up a lot more backup space than necessary and takes longer to run backups.

Image copies faithfully copy any errors you have in your file system. If you have to restore a corrupt file system you will find that the errors are also restored from the backup.

If you have any hard links then the hard links will not be correct if you restore to any place other than the exact location where the image copy backup originated. In other words if you backed up hda1 and later restored it to hdb2 then none of your hard links would work.

Image copy is a pain when trying to restore to a partition which is a different size than the original partition.

--------------------
Steve Stites
 
Old 01-27-2009, 07:29 PM   #3
maroonbaboon
Senior Member
 
Registered: Aug 2003
Location: Sydney
Distribution: debian
Posts: 1,495

Rep: Reputation: 48
While the above is excellent advice, there are situations where you really do want an image. So what to do in this case? I would probably try the following:

1. Fill disk with zeros before installing system.
2. Install system to your liking.
3. Attach backup disk to receive image
4. Reboot off live CD. Mount backup disk to receive image file.
5. Use 'dd' command piped into gzip to copy system disk.

Empty parts of the disk will be full of zeros, so will compress to very little space. Using bzip2 rather than gzip will give a smaller compressed image, but will take longer.

To restore just use 'dd' and gzip in reverse.

Since I've never actually done this, I'm reluctant to try filling in all the details. I'm happy to have a go, or perhaps someone else could comment. Or if the OP doesn't really need an image I guess it is irrelevant.

EDIT. Or there is G4L.

Last edited by maroonbaboon; 01-27-2009 at 08:10 PM.
 
Old 01-27-2009, 10:29 PM   #4
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 4,137
Blog Entries: 1

Rep: Reputation: 873Reputation: 873Reputation: 873Reputation: 873Reputation: 873Reputation: 873Reputation: 873
G4L is pretty nice / usable.

Otherwise dd or tar. Whatever floats your boat. Lots of options depending on how / where you wnat to store / restore it from.

HTH
 
Old 01-28-2009, 05:27 AM   #5
makyo
Member
 
Registered: Aug 2006
Location: Saint Paul, MN, USA
Distribution: {Free,Open}BSD, CentOS, Debian, Fedora, Solaris, SuSE
Posts: 732

Rep: Reputation: 75
Hi.

1) See also http://www.clonezilla.org/

2) You may not want to give up speed of execution, but I have found that virtualized machines can provide very fast image backup through snapshots. I currently use VMWare server to run several distributions of Linux, BSDs, and even a Windows instance. To capture an image, I click a Snapshot button on the server console and less than 2 minutes later (often faster), I have an environment from which I can restore the previous situation. I usually do that before installing a large number of updates (Debian lenny was prone to odd results for updates over a 2-4 week period last year, thankfully the developers finally produced a good set of updates, but the snapshot feature helped me keep sane during that turbulent time). Once you have the host system, it takes about a minute to set up a new virtual machine into which you can install a new guest OS. I don't want to minimize the initial work that will be needed to set up the VMWare server environment (I built a minimal host of Debian stable -- etch at the time -- onto a software RAID1 system as the host), but for general experimentation, I have found nothing better so far. ... cheers, makyo
 
Old 01-29-2009, 05:11 PM   #6
bctechman
LQ Newbie
 
Registered: Jan 2009
Posts: 3

Original Poster
Rep: Reputation: 0
I'm definelty looking for an imaging concept. The idea where I would need this would be if the legacy equipment is physically broke and I didn't want to rebuild any of this.

Do the programs mentioned above do just RAW imaging? or does it compress like normal imaging software?

Thanks,
 
Old 02-02-2009, 06:57 PM   #7
maroonbaboon
Senior Member
 
Registered: Aug 2003
Location: Sydney
Distribution: debian
Posts: 1,495

Rep: Reputation: 48
I'm not familiar with your terminology. Abstractly the storage device is just a data file, with size equal to the capacity of the device. An image is a copy of that file. Is there some other meaning?

If you can arrange that the free space on the device is mainly filled with 0's (or 1's for that matter) then the image will likely shrink a lot when you compress it with any of the standard compression methods (gzip, bzip2).

If the free space is full of random data from deleted files then the compression will not be so good.
 
Old 02-03-2009, 09:54 AM   #8
bctechman
LQ Newbie
 
Registered: Jan 2009
Posts: 3

Original Poster
Rep: Reputation: 0
what I talking about is, most imaging program capture the just the data on the hard drive versus the actual hard disk. So if I have an 80gb hard drive and a parition for the entire 80gb, but I only have 8gb of data installed, then only the data is captured and compressed making an image less then 8gb in size. Raw imaging would make an 80gb image file of a 80gb hard drive.

So what am I wondering if all the methods above use the raw imaging method or well just the data be put on the image so I would have an image that could possibly fit on a dvd?

Re-reading the previous posts, I guess the difference in my situation is I've already built the system, and want to capture what I've built. Next time I build a linux setup I may try some of this, but what I'm looking to do right now is make an image of current setup I have in a compressed format.

So does anybody know of any programs like norton ghost, Altiris Radid Deploy, etc. That would do compressed images of linux systems?

Last edited by bctechman; 02-03-2009 at 09:56 AM.
 
Old 02-04-2009, 07:12 PM   #9
maroonbaboon
Senior Member
 
Registered: Aug 2003
Location: Sydney
Distribution: debian
Posts: 1,495

Rep: Reputation: 48
If the system is already built you can fill the free space on a partition with zero bytes by running 'cat /dev/zero > bigfatnothing' until it runs out of room and then deleting bigfatnothing. When the resulting image is compressed the zeroed out parts of the disk will compress to almost nothing. It probably packs into such a small space you can ignore it.

So if you can pack the original disk contents into a DVD, you can probably fit the compressed image on there too.
 
Old 10-19-2009, 11:06 PM   #10
grendal_prime
LQ Newbie
 
Registered: Oct 2009
Posts: 1

Rep: Reputation: 0
I find it a bit odd that nobody suggested partimage

I know this thread is old..but.... partimage people. Ive used it dozens of times without error. It has a simple to use interface and works on about every type if file system you can imagine. It allows you to compress the images and works over a network. It also only stores the data. Block by block devices like dd take up huge amounts of space. (3 gig partion with only 1 gig of data makes a 3 gig backup with DD , but with partimage it makes a 1 gig backup. And if you compress the data even less!). On a 10-100 a 2 gig partion will take about 12 min.

You can also write scripts that call partimage with the switches you need. Run them from a second machine via cron, that way you have an automated backup for an entire partion!

Sorry im ranting..i guess what im trying to say is...try partimage!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
V4L2 image capture problem c0deland Linux - Software 4 12-12-2008 04:19 AM
it is possible to install an image file of a harddisk with linux to a computer with michielsmissaert Linux - Newbie 2 08-28-2007 04:08 AM
Linux Based Screen Capture Utility (streaming, not single image) fultron Linux - Newbie 2 02-16-2007 03:59 AM
Capture output from another computer mijohnst Linux - General 2 09-21-2006 03:58 PM
when i press printscreen, it doens´t happen anything(do not capture image ) sagi7ario Mandriva 2 03-15-2004 03:30 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:52 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration