a non-geek's blog

Random notes on linux and web development

How to backup your Windows in Linux

leave a comment »

I will show you how to make a fast backup of your windows partition from the command line. Of course, that is if you have enough space on your linux partition. Open a console and type the following command:

 

$ tar -cvzf win_backup.tar.gz /mnt/win

Where win_backup.tar.gz is the name of the archive and /mnt/win/  is the path to the windows partition (what to backup).

If there is a folder you don’t want to backup, use the exclude option. E.g.:

 

$ tar -cvzf win_backup.tar.gz --exclude= "/mnt/win/Downloads/*" /mnt/win

 

To restore do:

 

 $  tar -xvzf win_backup.tar.gz

 

Switch Explanation:
x -extract the contents of the TAR file
c -create a TAR file
z- uncompress it before extracting, used on file ending in .tar.gz or .tgz
v -verbose – display contents as it is tarring or extracting

f  -filename to follow


Bookmark and Share

About these ads

Written by nongeekboy

June 2, 2008 at 10:17 am

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 201 other followers

%d bloggers like this: