Mount a shared folder as a local drive (Serv 2K3 - 2000 Server)

dawks

Diamond Member
Oct 9, 1999
5,071
2
81
Our SQL server makes backups every night, but enterprise manager wont let you save them to a network drive (since network drives only exist when a particular user is logged on). So I was hoping there was a way to mount a network share as a local drive so we can store our backups there instead. Is this possible? Is there some other solution? Perhaps someone knows of a script that can copy the files over to the network share, and delete them after? Thanks.
 

Lord Evermore

Diamond Member
Oct 10, 1999
9,558
0
76
I don't believe it's possible to connect to a network drive without a user logging in, like as a "service".

You can easily make a script to copy the files, just a plain old batch file with the xcopy32 or move commands, however you still need a user to log in for the script to execute once the network drive has been mapped.

Depending on what systems are around and where these servers are located, you could use a Firewire drive connected to both systems for the backup location, and the destination server could just be scripted to pull the files off the drive when the backup is done. I'm not sure if you can set up that script to run at a certain time every night without a user logged in. I assume though that you're trying to move the files to a server located in a different area.
 

JDMnAR1

Lifer
May 12, 2003
11,984
1
0
I don't believe that Enterprise Manager will let you use a network drive for a backup device, even with a user logged in and drive mapped. What you can do to get around that is set up a couple of extra steps in your scheduled backup job. The first step will be of type Operating System Command (CmdExec), and plug in an appropriate net use statement. The second step should be your backup step, and finaly add a third step to copy the file to your network share.
 

rasczak

Lifer
Jan 29, 2005
10,437
23
81
Why don't you purchase an external hard drive to use as your backup? This way you don't have to piss off your EM and you get to backup every night plus take it off site where it's protected. (of course you really have to be careful about leaving it lying around)
 

dawks

Diamond Member
Oct 9, 1999
5,071
2
81
UNC does seem to work, thanks!

And this was a backup to an external harddrive. Its just plugged into another system that has a USB2 card in it. Its actually much faster to transfer over the network then via USB1 :D