I have two windows servers and want to take backup of certain folder from one server to another server automatically whenever that folder is updated. Or at least as a hourly/daily task. In Unix there is a feature called rsync. I am not able to know how its done on windows. Both the servers are in Intranet but in different locations, so the transfer rate is little slow.
4 Answers
You can use rsync on windows with Cygwin, but I suggest you use the tool Robocopy for this.
To use robocopy:
Robocopy C:\YourFolder \\RemoteComputerName\Share
Also check the options here.
-
-
yes. I do backups of certain folders on all my users computers every 2-3 hours using a robocopy script ran from a scheduled event– SafadoApr 23, 2012 at 15:42
-
@user434509 windows comes with an equivalent of cron called the task scheduler. Apr 23, 2012 at 16:07
If you're looking for something you can run periodically as a scheduled job, then check out robocopy.
If you're looking for something that will automatically transfer changes in near-realtime, then you'll need to look into setting up DFS replication between the two servers.
-
I think DFS can do it. but I have a doubt about using it. When I try to set this up it is asking for a domain root. How can we put an IP address instead of domain root. Apr 23, 2012 at 15:39
-
You need to read about how DFS works. Namespaces would be where you would setup the folders to show up as virtual shares under the Domain Root. Once you create the shares, you can then add replication between them to keep the folder on one server synced with another. Basically DFS syncs two shares. (very basically, it's a bit more complicated than that). Apr 23, 2012 at 21:42
I recommend using Windows Backup. It allows for Differential OR Incremental backups to a file location, which should give you what you need.
What are you backing up? Just static files, or a DB?
-
-
Windows Backup will do this. I recommend it over Robocopy (which will work) because Windows Backup will not only do what you're looking for, but it will also schedule the task for you. All GUI, no command line. Apr 23, 2012 at 15:42
Rather than trying to copy the files and setting up jobs, I'd probably set up DFSR. Distributed File System replication allowsreplication scheduling and bandwidth throttling. DFS Replication uses a compression protocol called Remote Differential Compression (RDC), which can be used to efficiently update files over a limited-bandwidth network. Additionally cross file replication can be used to further reduce the amount of data transmitted (very useful for journal type files)