a non-geek's blog

Random notes on linux and web development

Posts Tagged ‘backup linux windows tar cli bash shell command

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

Written by nongeekboy

June 2, 2008 at 10:17 am

Follow

Get every new post delivered to your Inbox.

Join 213 other followers