LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Creating an image file in Ubuntu Feisty. (https://www.linuxquestions.org/questions/linux-software-2/creating-an-image-file-in-ubuntu-feisty-551271/)

glore2002 05-04-2007 10:37 AM

Creating an image file in Ubuntu Feisty.
 
Hello again!

In windows, I'd use Ghost, Acronis True Image, etc. There are a lot of programs to create image files to be able to restore the system from scratch. If a problem happens, I restart the computer, run Ghost and then restore the image. After that, everything gets back to when the image was created. I know that many but all of you know this but I still write it as an introduction to be as clear as I can. Sorry if I am too redundant.

Let's go to the point:

Is it possible to create an image file of my Ubuntu installation? If so, What should I install or what steps should I follow to backup and to restore?

I mean not only backup some or many of my files files but creating a complete and exact image file of the partitions so I can restore my Ubuntu configuration and programs from scratch is any problem occurs.

For instance. Now, I would like to try Slackware 11 to see how it works but after testing it I would like to go back to Ubuntu feisty as it is configured now. Is that possible? I hope so :-)

Thank you very much,
Glore2002.-

b0uncer 05-05-2007 04:21 AM

Well dd can do exact one-to-one copies, images if you like, of disks. And write them back to disks. But I've never tried how well it actually works (note: it creates an image the size of the disk, so if you used dd to create an image out of a 160GB disk, the image was 160GB big in size), but it's easy to use.
Code:

man dd
helps you out.

I'm pretty sure there are nicer methods for this, anyway. dd is nice especially for small medias, like backing up your ipod :)

jschiwal 05-05-2007 05:35 AM

You can pipe the output of dd through gzip or bzip2. The resulting size tends to be proportional to how full the partition is. It would work better on a new installation where you don't have deleted files. If you wanted to save the image to an external drive, keep in mind that the fat32 filesystem has a 2 GB filesize limit. That's ok, because you can pipe the output of gzip through the split program to break up the image into manageable slices. Then you could use par2 to create parity files in case one of the slices became damages.

Restoring would use the reverse process. You could use cat to re-join the compressed image, which you would pipe through gzip and then the dd program.

It would be better to back up the MBR and use file backup instead of saving and restoring an entire image. You could use dd to restore a corrupted MBR, and then use tar to restore all of the files.

Before performing a fresh upgrade of SuSE 10.2, I used tar to back up the files of my home partition. The filesize of the archive would be too large to store on the fat32 USB drive I was backing up to, so I used split to break it up. Piping the output of cat to tar, I was able to restore from the backup without needing to reassemble a large tar archive.


All times are GMT -5. The time now is 08:16 AM.