Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

share|improve this question
1  
have a look at the dd command. –  Simon Apr 15 '13 at 13:06
    
This is a tricky question, and there are a lot of ways to do it wrong, so before you do anything you should take a look at the examples here. At least you will learn from the examples what NOT to do. –  karel Apr 15 '13 at 13:27

2 Answers 2

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.

share|improve this answer

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/

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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