I want to make an image with existing Linux tools from the bash console. Can somebody tell me how to accomplish this task?

Let's assume /dev/sda including its master boot records need to be backed up. How do I accomplish that?

Also how do I recover everything in a row at a later point of time?

  • 1
    have a look at the dd command. – Simon Apr 15 '13 at 13:06

IMHO the best option is to use a tool like Clonezilla. I suggest you to get a copy of Parted Magic (which contains a lot of useful tools for disk and system maintenance, including Clonezilla), and run it as a LiveCD (or LiveUSB).

Clonezilla itself has a simple user interface that helps you to properly set the options you need, but if you spend a little time to learn the variables, it can also be launched from the command line.

When working with partitions, it is always better to have them unmounted, something that you can't always do if you are logged in in your system and want to work with the disk where the OS in installed.


As Simon suggested in a comment, look at dd.

Here's a blog post that shows how to create it and how to restore from the disk image: http://blog.lynxworks.eu/2007/09/using-dd-to-create-disk-images/

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.