Home > Ask the Storage Technology Experts > Backup/Recovery Questions & Answers > Backing up with Windows
Ask The Storage Expert: Questions & Answers
EMAIL THIS

Backing up with Windows

W. Curtis Preston EXPERT RESPONSE FROM: W. Curtis Preston

Pose a Question
Other Storage Categories
Meet all Storage Experts
Become an Expert for this site


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


>
QUESTION POSED ON: 31 May 2002
I am writing a program to backup all the files in zip format from a drive. I am using PKzip software that runs in command line. Since this program needs to run everyday, the zip files name will be in accordance with the date. Suppose the file is stored today the zip file name will be 05/08/02, etc. Since I can't have variables defined in batch file, I used Windows scripting host, i.e. VBS to give me current date. Now I have current date in VBS format and command for zip file in batch format. I need to combine all this in WSH so that scheduler will start this program every morning. How do I do that?

>

This is really a Windows question and I am far from a Windows GURU but I'll give it a shot.

My quick advice: Forget VBS and the scripting host and use batch files. You can indeed have variables in a batch file. Here is the script I use (and run using the "Scheduled Activities" GUI in 2000/XP) to back up my registry to a new file every day. (Actually, it backs it up to alternating names. One day is uses .1, the next is uses .2 and so on). You should be able to modify this script to do what you want. The last two lines are used to zip up the backup of the registry file.

set DAY=%DATE:~0,3%

if %DAY%==Sun set BIT=1
if %DAY%==Mon set BIT=2
if %DAY%==Tue set BIT=1
if %DAY%==Wed set BIT=2
if %DAY%==Thu set BIT=1
if %DAY%==Fri set BIT=2
if %DAY%==Sat set BIT=1

ntbackup backup systemstate /J "Backup Job %BIT%" /F "C:REG-%BIT%.bkf"

if exist C:REG-%BIT%.ZIP DEL C:REG-%BIT%.ZIP

C:Progra~1OntrackZipMagiczmzip -e4 -m C:REG-%BIT%.ZIP C:REG-%BIT%.bkf

Editor's note: Do you agree with this expert's response? If you have more to share, post it in one of our discussion forums.


BROWSE BY TAG
Backup/Recovery,   VIEW ALL TAGS

Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   



RELATED CONTENT
Backup/Recovery
Troubles with burning software
Running a second daily backup
Remote data software
Using NetBackup with different servers
Different types of disasters and how to protect your data
Contact vendor for error message troubleshooting
What about consolidating data tape to tape?
Are people backing up data to a mainframe?
Five golden rules for backup
Explaining the essence of disk-to-disk backup and its advantages

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary



Search and Browse the Expert Answer Center
Search and browse more than 25,000 question and answer pairs from more than 250 TechTarget industry experts.
Browse our Expert Advice



Search for Data Management Tools
TechTarget Storage Media
Storage Magazine View this month\\'s issue and subscribe today.
Storage Decisions Apply online for free conference admission.
SearchStorage.com
HomeNewsMagazineTopicsLearningMultimediaWhite PapersBlogsEventsAbout Us

About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 2000 - 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts