selinap.com

To leave furtively and stealthily.

Home » Computer Tips

Backup folders with 7-zip command line

April 15th, 2008

The 7-zip command line can be used to do a multiple folders backup. The good thing with 7-zip is that it support many compression method such as bzip2, gzip, zip and of course 7z.

Here are steps for doing a backup on multiple folders on Windows:

  1. Download the 7-zip Command Line Version from http://www.7-zip.org/download.html.
  2. Extract the content of the zip file to a temporary folder.
  3. Copy 7za.exe to your system folder (for example C:\Windows\System32\ for Windows XP).
  4. Create a folder for your backup, for example C:\backup.
  5. Create a text file in the C:\backup folder and name it backup.txt.
  6. List the full path of the folders that will be backup, each on a new line.
  7. Create a batch file in C:\backup folder and name it backup.bat.
  8. In the backup.bat file, type
    7za u backup -up1q3r2x1y2z1w2 @backup.txt

To back up, just double click the backup.bat file. A command prompt will be opened and closed automatically when the backup process end.

As a result, you will get a backup file named backup.7z. The u command will instruct 7-zip to update the content of the backup.7z file or create a new one if backup.7z does not exist.

If you don’t like the 7z compression method and would like to use the zip compression method instead, just add -tzip switch after the u command.

7za u -tzip backup @backup.txt

Now, the backup file that will be created is backup.zip.

To automatically run a backup at a specific time, please use the Scheduled Tasks feature for Windows XP.

Related Articles:

Popular Articles:

Spread/Promote this article.

Digg | Del.icio.us | Stumble | Y! MyWeb | Y! Buzz | Fave It! | Reddit

Subscribe for free.

 Subscribe to Selinap.com feed right now!

 Get Updates by Email

Tags: , , , , , , , ,

2 Responses to “Backup folders with 7-zip command line”

  1. Justino Figueiredo says:

    Works like a charm and saves me quite the hassle. Many thanks.

  2. selinap.com says:

    Congratulation, Justino Figueiredo

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="">


© Copyright 2008 - 2009 selinap.com
Entries (RSS) and Comments (RSS).