Search This Blog

Saturday, 21 January 2012

ghost images restore in windows

 Restoring


Warning: Please, for goodness sake, be careful here. If you don't understand what you are doing here you might end up overwriting stuff that is important to you, so please take care!

Well, we'll just continue with our example from the previous chapter; the file backup.tgz in the root of the partition.

Once again, make sure you are root and that you and the backup file are in the root of the file system.

One of the beautiful things of Linux is that This'll work even on a running system; no need to screw around with boot-cd's or anything. Of course, if you've rendered your system unbootable you might have no choice but to use a live-cd, but the results are the same. You can even remove every single file of a Linux system while it is running with one command. I'm not giving you that command though! 

Well, back on-topic.
This is the command that I would use:


Code:

tar xvpfz backup.tgz -C /

Or if you used bz2;


Code:

tar xvpfj backup.tar.bz2 -C /

WARNING: this will overwrite every single file on your partition with the one in the archive!

Just hit enter/return/your brother/whatever and watch the fireworks. Again, this might take a while. When it is done, you have a fully restored Ubuntu system! Just make sure that, before you do anything else, you re-create the directories you excluded:

Code:

mkdir proc
mkdir lost+found
mkdir mnt
etc...
mkdir sys

And when you reboot, everything should be the way it was when you made the backup!

No comments:

Post a Comment