Solved

Backup script

Posted on 2007-03-20
7
223 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
7 Comments
 
LVL 96

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
How our DevOps Teams Maximize Uptime

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us. Read the use case whitepaper.

 
LVL 96

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 96

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

Resolve Critical IT Incidents Fast

If your data, services or processes become compromised, your organization can suffer damage in just minutes and how fast you communicate during a major IT incident is everything. Learn how to immediately identify incidents & best practices to resolve them quickly and effectively.

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 …
Active Directory replication delay is the cause to many problems.  Here is a super easy script to force Active Directory replication to all sites with by using an elevated PowerShell command prompt, and a tool to verify your changes.
Learn the basics of lists in Python. Lists, as their name suggests, are a means for ordering and storing values. : Lists are declared using brackets; for example: t = [1, 2, 3]: Lists may contain a mix of data types; for example: t = ['string', 1, T…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

710 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