views:

56

answers:

2

At my workplace I have various Sql Server instanced, on different Windows Servers. When I make a backup of a Sql Server database instance, it sits on that Windows Server and not on my machine so to see the file (e.g. be able to right click > Properties on it), I need to remote desktop into that server.

However, what commands are available to copy the file to my desktop/machine? I have seen people run a command to paste a file to my desktop, from another, by typing something like C$ in Windows Explorer.

Thanks

A: 

You could run an FTP server on one of the machines, and then use an FTP batch script to copy the file(s) you require.

GaZ
There's some built in commands in Windows Server. I was actually trying to find what they are, although your answer is valid. :)
dotnetdev
A: 

The "C$" stuff is called "administrative shares", and is something you really want disabled for security reasons - google it.

But assuming administrative shares are on, you can type something like the following from your own machine: open a shell, and type "copy \server.domain.com\C$\path\to\backup.dump c:\local\path" , assuming the backup is on C: - for another partition, guess what you have to change? :). This requires that your local account matches an account (w/administrative privileges) on the remote server as well.

A better thing would be explicitly sharing the folder on the server that has the backups, which lets you control the access restrictions explicitly.

snemarch

related questions