I need a way to restore a drive image (C:) automatically.. My client earlier had some Norton Ghost 2003 floppy disk with some batch program to initiate a Drive Restore operation via the command-line of GHOST.EXE (the main executable of Norton Ghost 2003)

Any available programs that can restore a drive image via the command line, or similiar? Preferably via a Shell command.

migrated from stackoverflow.com Jul 24 '11 at 10:19

This question came from our site for professional and enthusiast programmers.

  • the windows system image and "wbadmin" is probably a better answer today – Martin Beckett Jul 25 '11 at 13:04

You may want to check out PartImage

  • How do I get this functioning on a Windows XP machine?! – Robinicks Jan 3 '09 at 17:23
  • There's a bootable CD that boots up Linux, so you can completely bypass windows. – Kibbee Jan 3 '09 at 17:24
  • Yeah, I was just looking up SystemRescueCd - sysresccd.org/Main_Page – Robinicks Jan 3 '09 at 17:28

If you have a Linux live CD at hand, you can use the power of dd.

Take image with something like:

dd if=/dev/sda1 | gzip > /path/to/my/image.img.gz

And restore it with something like:

zcat /path/to/my/image.img.gz | dd of=/dev/sda1
  • ntfsclone is probably easier (and certainly faster) than dd – Martin Beckett Aug 4 '10 at 15:33

Do you need to restore from an existing image, if so then you need the tool that made it.

Do you want to set up a system where you can easily restore from an image you've presently made, then ghost should be able to do it, but there are plenty of others.

Do you want to set up a system where each reboot restores the system to a former known good state? If so, then look at Rollback Rx Pro, and there are other similar systems as well.


If you have TWO networked pc's and two linux live cd's you can dump the image across the network using netcat as well;

dd if=/dev/sda | nc otherhost portnumber

On otherhost you do

nc -l portnumber | dd of=/dev/sda1

You have to run on otherhost first. This saves you the trouble of storing the image anywhere.

  • +1 very nice. You could have piped through some compression program too ;) – Mehrdad Afshari Jan 3 '09 at 17:28
  • Think of the things you could do with THREE pc's and THREE live cd's ;) – krosenvold Jan 3 '09 at 17:37

A little plug for my favorite drivesnapshot - a little simpler for windows users in that you can back up windows while it's running and restore the OS partition from within windows

If your system can no longer boot there is also a restore cd/USB/Floppy.


SystemRescueCd - It's a livecd that allows to use Partimage immediately even if your computer has no OS installed (useful to restore an image), and it allows to save an image on a DVD on the fly.


Check out Clonezilla http://clonezilla.org/. It has all you need!

'Clonezilla Live' enables a user to clone a single computer's storage media, or a single partition on the media, to a separate medium device. The cloned data can be saved as an image-file or as a duplicated copy of the data. The data can be saved to locally attached storage device, a SSH server, Samba Server or a NFS file-share. The clone file can then be used to restore the original when needed.

The Clonezilla application can be run from a USB-flash-drive, a CD-ROM, or a DVD-ROM. Clonezilla requires no modification to the computer; the software runs in its own booted environment.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.