I'm a new Linux user. I've reinstalled my Wubi from scratch at least ten times the last few weeks because while getting the system up and running (drivers, resolution,
etc.) I've broken something (X, grub, unknowns) and I can't get it back
to work. Especially for a newbie like me, it's easier (and much faster)
to just reinstall the whole shebang than try to troubleshoot several
layers of failed "fixing" attempts.
Coming from Windows, I expect that there is some "disk image" utility that I can run to make a snapshot of my Linux install (and of the boot partition!!) before I meddle with stuff. Then, after I've foobar'ed my machine, I would somehow restore my machine back to that working snapshot. What's the Linux equivalent of Windows disk imagers like Acronis True Image or Norton Ghost? Note: I found a similar question here. |
|||||||||||||||||
|
dd is the low level utility that you can use
to accomplish this task, it essentially a low level byte-for-byte copy
utility. If you want the "UNIX" way of accomplishing this, then read on.All references to the file system and hard disks are located locally on the virtual /dev/ filesystem. There are a multitude of "nodes" in /dev/ that are interfaces to almost all the devices on your computer. For example, /dev/hda or /dev/sda would refer to the first hard drive in your system (hda vs sda depends on the hard drive), and /dev/hda1 would refer to the first partition on your hardrive. The most straight forward way to make a raw image of your partitions is to use dd to dump the entire partition to a single file (remember the OS access the partitions /dev/sda1 through a file interface). Make sure you are on a larger partition or on a secondary drive and perform the following commanddd if=/dev/hda1 of=./part1.image to backup(repeat for different partitions)dd if=./part1.image of=/dev/hda1 to restoreYou can use the exact same command to backup the entire hard disk (replace hda1 with hda).
You can then use any compression program (gunzip, zip, bzip) to
compress the file for storage. You can use this same technique to make
rote copies of entire partitions to make clones of your computer. There is one limitation though, when restoring the backup, the partition needs to be the same size as the partition you took the image from, so this limits your options in case of a restore. However, you can always expand the partition after you've restored the backup using gparted or parted.
The picture gets even muddier when you are trying to restore entire
disk copies, however, if you are restoring the backup to the same exact
hardrive you don't need to worry about this at all. However, if you want a "friendlier" utility ala norton ghost then this suggestion might not be for you. |
|||||||||||||||||||||
|
The "dump" and "restore" backup utilities in the Ubuntu
repositories provide you with the ability to backup and recover an
entire system's "system state".
The "dump" and "restore" utilities can be installed from the repositories using:
Below are links to the Man pages:⠀Dump ⠀Restore In your case, you could backup the system to a portable drive:
For recovery you would need to:
More information can be found at Move linux to another hard drive (dump, restore, backup) |
|||||||||||||||||||||
|
You can do exactly what you need using CloneZilla
|
|||||||||
|
There also Ghost for Linux, but Clonezilla
is the better option - it's more up to date. The latest version of
Ghost for Linux is listed May 2009, while Clonezilla's latest version
was posted in November 2010. One minor limitation of Clonezilla
compared to Ghost is that you can't resize the partition on restore,
while Norton Ghost can.
You probably won't need it, but Clonezilla also supports multicasting. |
|||
| add comment |
Using "Dump" and "Restore" is one solution, as indicated by virtual.stack.
However you might be interested in using Clonezilla if you have an external USB hard disk drive or a NAS. You just have to download an ISO image by clicking here (you can access the global download page here), burn it with "Brasero". Boot from Clonezilla Live CD and perform a backup (disk or partition to image) of your main hard disk drive (with your healthy Ubuntu). Please note that you can't backup the partition you have mounted as backup destination (quite logical). If your system is broken, you just have to boot again with Clonezilla Live CD and perform a restore of your system. Don't forget that Clonezilla makes snapshots, so if you have your data ("/home", "/etc", ...) on the same disk/partition as Ubuntu system, you'll get back the one from the backup and loose what has been done since that backup was performed... You can find a tutorial for Clonezilla Live here : How to Use Clonezilla - Tutorial You can also use "Back In Time (backintime-gnome)" (available from Ubuntu Software Center) or else (Déjà Dup, ...) alongside to get a backup of your data. You just have to include ("/home", "/etc", "/var", "/usr/local", ...) in the backup profile. Like that you can get back your healthy system with Clonezilla and then your latest data with "Back In Time" or else. |