Solved

Backup script

Posted on 2007-03-20
7
220 Views
Last Modified: 2010-04-16
I would like to create a simple backup script to copy an OS image to an external drive at the end of each day. I know nothing about programming and very little about DOS. Ive searched here and other places but haven't found a solution yet. I've actually created a couple of scripts by reading about it but have not yet been successful with those scripts. At one time I found a VBS script used to create a restore point with just one click. That's what I'm hoping I can do with a backup script whether it's VBS or Batch.

Here's the scenario; Each day my imaging program will perform a full image of my OS and partition. At the end of each day I would like to copy that image to an external drive overwriting the previous days backup. It doesn't necessarily have to be scheduled I could start it manually with no problem. XP will is the OS.
0
Comment
Question by:mpcm
  • 4
  • 3
7 Comments
 
LVL 95

Accepted Solution

by:
Lee W, MVP earned 250 total points
ID: 18761723
What you're asking for isn't really a script - it's more a simple command in a file named "something.cmd"

copy "x:\location\of\the\image\file\to\backup\filename.ext" "y:\location\on\external\drive"

0
 

Author Comment

by:mpcm
ID: 18763549
leew,
       I must be doing something wrong. I did as you said then checked file and it was not there. This is what I created: "e:\\BAT\BAT test file.txt" "g:\\BAT Backup" (exactly as presented) in Wordpad then saved it as Test Backup.cmd. I doubleclicked file, the command window flashed and was gone. I then checked the BAT Backup folder on g: drive and BAT test file was not there. I appreciate your help.
0
 

Author Comment

by:mpcm
ID: 18763597
After reading my post, I saw that I had entered command wrong. I omitted one of the backslashes on the g: drive. I ran command and still no file. New command:"e:\\BAT\BAT test file.txt" "g:\BAT Backup"
0
DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

 
LVL 95

Expert Comment

by:Lee W, MVP
ID: 18764252
Why are you using e:\\... ?

it's a single slash only.  \\ is used to start a UNC - \\server\share... with drive letters, unless the command is special (and this one isn't), you always use single slashes.
0
 

Author Comment

by:mpcm
ID: 18765340
leew,
       Just an oversite on my part. I created another corrected .cmd file and it worked! Thanks for your help. Here is the final command for others who may want to do this. copy "e:\BAT\BAT test file.txt g:\BAT Backup.
0
 
LVL 95

Expert Comment

by:Lee W, MVP
ID: 18765559
No, that shouldn't work either - each path MUST be in quotes:
copy "e:\BAT\BAT test file.txt" "g:\BAT Backup"
0
 

Author Comment

by:mpcm
ID: 18766059
leew,
You are so right! All these details are a reminder of why I'm not a programmer.
Anyway thanks for your help......................
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

How to remove superseded packages in windows w60 or w61 installation media (.wim) or online system to prevent unnecessary space. w60 means Windows Vista or Windows Server 2008. w61 means Windows 7 or Windows Server 2008 R2. There are various …
Deploying a Microsoft Access application in a Citrix environment is not difficult but takes a few steps. However, Citrix system people are often of little help, as they typically know next to nothing about Access. The script provided here will take …
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

26 Experts available now in Live!

Get 1:1 Help Now