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 setup my partition scheme to have an extra partition the size of my / partion. I have a separate home directory partition.

Essentially, I will be doing things that might make my OS unstable so I'd like to backup the OS state but without bothering my home directory.

Can I just backup (maybe with dd?) my root partition to another partition on the HDD? I know to restore it I would have to boot up with a livecd or something and do the reverse procedure. I want this to be as simple and require the least amount of external hardware as possible.

share|improve this question

3 Answers 3

Why not just chroot the applications that might make your OS unstable? That's what it was designed for.

But yes dd will work, or even making a tarball of it would do.

Edit: In light of your comment, perhaps a VM would be more suitable? You could just take a snapshot of the whole VM and restore it if something goes awry without having to recover your actual host OS.

share|improve this answer
    
Oh, well I'm doing kernel development so I might trash a lot of stuff! –  user37011 May 12 '10 at 23:07
    
@SomeNewbie - see my edit –  MDMarra May 12 '10 at 23:11
    
Oh I see, how can I do this with dd? The VM doesn't work for me because I will need to interact with a physical device and it is too much trouble to try to get that to go through it VMware or whatever. Also, I need all the speed I can get as kernel compiles are slowww! –  user37011 May 12 '10 at 23:42

Just make and use a snapshot, then dispose of it when you want to revert the changes.

share|improve this answer

Virtual machines and chroot are the obvious choices if you plan to make an unstable system, so my vote is to use one of those or you could dual boot.

As for backing up data, I always recommend rsync. Using dd to make an image has some drawbacks, the greatest being that you waste space as even unused space is used in the image. Also, you will have to completely remake it each time that you update, and your new partition probably wouldn't be able to use it anyway. With rsync, you only copy the files that you want and each update only updates changed files.

share|improve this answer

Your Answer

 
discard

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