I have two Windows 2003 servers, and I want to write a backup script on one that will copy a file to the other. What's the most idiomatic way to do this on Windows? Essentially, I'm looking for the Windows equivalent of
$ scp file.tar.gz user@host:/wherever
In response to questions: At the moment I'm only thinking about one file, a database backup. Potentially I might end up with multiple files, but I'm not that interested in rsync-like systems that track which files have changed and back up accordingly.
I'd like a solution that works with the servers on different networks, with firewalls in between. Opening up a single port on the firewall to a reasonably secure service ought not to be a problem.
copy/xcopy/robocopy and if you have the admin permissions, use the administrator shares like
Personally, I'd do it by mapping a drive from one server to the other and then copying the file to the mapped drive. Something like:
You could use robocopy instead, if you've got some more serious mirroring to do. I usually finish up by using blat or something similar to send me an email with a directory listing of the backup target, just to be sure everything made it over.
freeSSHd + PSCP/PSFTP
also I prefer For first time mass copy use robocopy
then install yadis back up on the remote or home server ( this will copy files to your remote server as soon as its changed or anything added to the specific folders )
http://www.codessentials.com/
and this is a link if you prefer PowerShell
https://social.technet.microsoft.com/Forums/en-US/f077b233-8814-45d1-9125-b8953f037bdd/need-to-copy-files-from-one-server-to-another-using-powershell-script-file?forum=winserverpowershell
I'd definitely use robocopy. It can copy files on Windows better than just about anything. So much power in that tool.
If you're not familiar with this, you should check out the Robocopy: Ultimate Guide post. It covers just about every bell and whistle on it.
Large files can't be copied with RDP, but you can copy files with any size by running command below through RUN: press Ctrl+r to run dialogue box then execute command below:
e.g:
\\192.168.10.20\c$
for more information: How to access C$ share in a network?