Sep 22, 2010

Using 7Zip For Backups

A few weeks ago my wife Mary went to the dentist to get her normal cleaning and checkup done. While she was there the dentist’s office server crashed and he wasn’t able to view patient records via computer, or look at X-Rays. You know, the good stuff that dentists need to do. Being a nice wife, Mary offered my computer services to the doctor, and here is the beginning of the story.

I eventually showed up at the dentist’s office to find out he had a small time computer company working on his stuff, and they wrote up a number of recommendations regarding his backup strategy. I mentioned in an older post that he was backing things up using a program called backup 2005 to an older 80GB Linksys NAS with no RAID capability. because of that I went out and got him an inexpensive Netgear Stora NAS. The only problem with the Stora was it wasn’t Active Directory integrated, and you couldn’t connect to file shares without a username or password. You also can’t share directories using anonymous connections.

 7zip-icon His Backup 2005 program was having issues, so I decided to go a different route, and tried the built in NT Backup. That didn’t work so well either, because for some reason it wouldn’t cache the credentials for the NAS. I decided that since all Backup 2005 did was create ZIP files any way, I could probably do the same thing using 7Zip which is free!

Now if you didn’t know, there is a command line version of 7Zip called 7za. With that you can create 7z files via command line. If you can create the files via command line then you can script that mo fo!

Here are the commands I used:


@echo off
echo Backing up BACKUPS files...
net use \\\ipc$ /user:USERNAME PASSWORD
7za.exe a "\\\MyLibrary\BACKUPS\%DATE:~-4%-%DATE:~4,2%-%DATE:~7,2%_BACKUPS.7z" "D:\Office\"
echo %date% backup complete>>Backuplog.txt
net use \\\ipc$ /del


If you don’t understand what is going on, first I pass the login credentials to the Netgear Stora, then 7za compresses the directory I want to backup into a file 7z file with a date stamp. The last two lines creates a quasi backup log, and then finally logs me out of the Netgear.

If you want to do something similar, make sure you change the above script to match your environment!

Do you use 7Zip to for backups? Have you ever used a Netgear Stora? What’s your favorite low-cost or free backup solution? Let us know in the comments.

Twitter Delicious Facebook Digg Stumbleupon Favorites More

Design by Free WordPress Themes | Bloggerized by Lasantha - Premium Blogger Themes | stopping spam