Results 1 to 9 of 9
I'm running Ubuntu 9.10. I'd really like to make an image of my entire system in the event of a mishap. I've found from experience that anything can happen with ...
- 01-30-2010 #1Just Joined!
- Join Date
- May 2005
- Posts
- 20
How do you make a copy of your system?
I'm running Ubuntu 9.10. I'd really like to make an image of my entire system in the event of a mishap. I've found from experience that anything can happen with Linux and then you're into another reinstall. Anyone know of a good program or process? Thanks.
- 01-30-2010 #2forum.guy
- Join Date
- May 2004
- Location
- arch linux
- Posts
- 18,099
I personally use a linux version of acronis true image on a live disk, but you can use clonezilla, partimage, or the dd command if you want free options. Other backup/recovery apps can be found here.
oz
→ new members/users: read this first | new member faq
→ no private messages requesting computer support - post them on the forums!
→ please use the "report post" button to alert our forum admins to problematic posts rather than responding to them yourself.
- 01-30-2010 #3Linux Guru
- Join Date
- Apr 2009
- Location
- I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
- Posts
- 8,975
I've been doing this for years, and it has saved my bacon on many occasions.
Here are a couple of examples of how to do #7 above. These examples assume that the system drive is /dev/sda and the mount point for your external backup drive is /mnt/usbdrive. Note that once you have formatted your external drive, you won't need to do that in the future, skipping step #4 above.1. Boot live cd/dvd/usb drive
2. Don't mount system drive.
3. Attach external drive (esata or usb) with adequate space to store a compressed copy of the system drive.
4. Format external drive with ext2 file system (don't use ext3 - you don't need the journalling).
5. Create a mount point for the external drive.
6. Mount the external drive file system.
7. Either use cat or the dd command to copy the system drive, piping the output to gzip to compress it, and direct the output from that to a file on the external drive.
Using the cat command:
Using the dd command:Code:# cat /dev/sda | gzip -c >/mnt/usbdrive/system-image.gz
Some of the dd command options, such as ibs=<read-size>, might speed up the process, but you can experiment with that.Code:# dd if=/dev/sda | gzip -c >/mnt/usbdrive/system-image.gz
To restore the system drive you basically do the opposize:
Here's how - note that the X in /dev/sdX1 below is the drive letter for the backup drive and /dev/sda is the system hard drive you are trying to restore:1. Boot live cd/dvd/usb drive.
2. Create mount point.
3. Mount external drive.
4. Uncompress and copy backup image to disc.
This will restore everything, including the boot record, partition table, and all partitions on the drive. I've used this technique when my system drive was starting to fail, when viruses totally munged my system, and when I did a major OOPSIE, such as being root at the file system root / and executing the command "rm -rf *" - doh! I try to keep a weekly backup image with this technique, just in case. The complete backup of my 320GB system drive takes about an hour, so I usually start it on a weekend around dinner time. By the time the dishes are put away, it is finished.Code:# mkdir /mnt /mnt/usbdrive # mount /dev/sdX1 /mnt/usbdrive # gunzip -c /mnt/usbdrive/system-image.gz | cat >/dev/sda
Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!
- 01-30-2010 #4Linux Guru
- Join Date
- Apr 2009
- Location
- I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
- Posts
- 8,975
BTW, the technique I described will also work with Windows system discs.
Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!
- 01-31-2010 #5Just Joined!
- Join Date
- May 2005
- Posts
- 20
Rubberman, are you using Partimage for this backup procedure?
- 01-31-2010 #6Linux Guru
- Join Date
- Apr 2009
- Location
- I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
- Posts
- 8,975
No. This is a very low-level raw backup/restore procedure. As I said, it is a true bit-image backup of the disc. All parts are backed up, including boot loader, partition table, and raw partition data. This is also necessary for forensic analysis of a disc. It is the only way to guarantee that you have every bit from the original drive without modification.
Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!
- 02-01-2010 #7Just Joined!
- Join Date
- May 2005
- Posts
- 20
When I insert my flashdrive, it auto-mounts and appears in /media/"flashdrive". Would I still need to mkdir flashdrive? Thanks so much for your help.
- 02-01-2010 #8
- 02-01-2010 #9Linux Guru
- Join Date
- Apr 2009
- Location
- I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
- Posts
- 8,975
Note that one of the reasons to use an ext2 file system, instead of the FAT file system used by smaller flash drives, or the FAT-32 file system used by bigger ones, is the file size limitations you might run into.
Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!


Reply With Quote
