7-zip is an open source alternative to PKZip for file compression. Like PKZip, it is also an excellent backup tool. You can use it to back up your entire system, or just the important portions to an external USB drive. Among 7-zip's good points:
On the down side, 7-zip doesn't support doing incremental backups (backups of only the files that have changed since the last backup). I never use this feature, so 7-zip is fine for me. If you need to do incremental backups, check out Using PKZip for Backups.
7-zip is designed for compression, not speed, so getting 7-zip to go as fast as pkzip is a bit tricky. Fortunately, I've figured it out so you don't have to. Here are the results of my benchmark tests:
|Program and Options
-tzip -mx=1 -mtc=on
-tzip -mx=3 -mtc=on
-tzip -mx=5 -mtc=on
|7-zip 4.65 (native)
-mx=1 -ms=off -mf=off
From this it's apparent that 7-zip is fastest when making a "zip" archive. So, if you're low on CPU power, a zip archive is best. 7-zip's native ".7z" format requires more CPU power, but does yield smaller files. I recommend doing your own benchmarks to determine how long you are willing to wait for your backup.
7-zip has many options to control its compression algorithms. If you decide that you want speed rather than compression, .zip format is the way to go. The following options are useful when working with .zip format:
-tzip" switches 7-zip to ".zip" mode
-mx=1" reduces compression to the minimum (fastest)
-mtc=on" adds creation and access times to the archive
7-zip's native ".7z" format offers slightly higher compression, but tends to require a lot of CPU. The following options are useful when working with .7z format:
-mx=1" reduces compression to the minimum (faster)
-ms=off" turns off solid mode (faster)
-mf=off" turns off special compression for exe files (faster)
Here's the centerpiece of my backup batch file:
7za a -tzip -mx=1 -mtc=on -v732954624 -r -x@c:\system\bm7za.exc %1 @c:\system\bm7za.inc
The includes file (bm7za.inc) looks like this:
documents and settings\*
It is important to note that in order for the full path to be stored in the 7zip archive, the includes entries must start with a directory name (so c:\system\* and \system\* will not work). This means that your batch file must switch to the appropriate drive and directory for your includes file to work properly.
The excludes file looks like this:
Temporary Internet Files
Restoring with 7-zip requires nothing other than an "x" for extract:
7za x backup.zip.001
If you want to restore a specific directory:
7za x backup.zip.001 "documents and settings\all users\*"
<- Back to my Technology pageCopyright ©2009, Ted Felix