Question Locked

BATCH SCRIPT

0 helpful
8 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I am running win. server 2008 as a virtual machine. the machine is hosting the SQL database. The SQL backup is deposited on the virtual platform. I have created a mapped drive from the Base machine where I am able to manually copy the backup file to an external storage device. I want to create a script and schedule it to run to copy from the mapped drive to external device.

I tried to create the following

xcopy z:\backups\* f:\external\* /y/q/s

8 replies

by tedayoung

Hi,Have you tried simply backing up from SQL to your external drive?

by mnghishekwa

Hi... well on a virtual machine running Hyper V, USB devices are not seen by the system. However on the Base machine I can. Perhaps there is a way of doing it, just that I don't know about it!!

by mnghishekwa

HI

I have scheduled the job for this evening. I want to see how it goes. Thanks

by mnghishekwa

Hi

From the looks of things your option looks just what I need. just one question. Where do I find the ROBOCOPY and how can I create a .bat file to schedule the job?

by amit.puthran

I guess you found a solution but for information sake, you can look up robocopy from google, it's a MS tool and free to download. You can create a simple batch file by opening a notepad and enter in the copy commands and save the file as a .bat file. You can then run this .bat file as a scheduled task.

Hope that answered your question.

by mnghishekwa

Gentlemen!!

In my previous posting i wanted help in creating a script that would copy content from a mapped rive to a local drive and a good suggestion was offered. Thanks very much.

I however looked closer at the SQL 2005 server backup plan and saw that I could actually backup directly to the extyernal drive by sharing the drive on the base machine and creating a mapped drive on the Hyper V platform. All to be done to point the backup to the map.

Thanks for all your suggestions.

This discussion is closed to new replies.