Link to home
Start Free TrialLog in
Avatar of Gudorian
GudorianFlag for Sweden

asked on

Transfer files on folder change three-way

Hi,

I have on one server a folder where files are uploaded to. When a file is uploaded to this folder I want to send it to a second server in a different network.

What's the best way of doing this? FTP, some kind of web-drive, syncing software?

And how do I set it up?

The servers are running Win server 2008 (Source server) and Win server 2003 (Destination server).

The files being sent isn't sensitive, so high security isn't as important as high reliability.
Avatar of Vinchenzo-the-Second
Vinchenzo-the-Second
Flag of United Kingdom of Great Britain and Northern Ireland image

Hi,
If the servers are in domain you can use DFS for this.  As soon as the files are uploaded DFS will replicate the files to the destination server

Here is step by step guide from Microsoft:
http://technet.microsoft.com/en-us/library/bb727150.aspx
Avatar of Gudorian

ASKER

They are not in the same domain
Are the domains part of the same forest?
Source server (2008) isn't part of any domain, it's a VPS hosted by a Web hosting company, the target server (2003) is part of a domain.
Right, DFS is out of the question then...
Avatar of arnold
You would need to use something like rsync or setup a vbscript service that will monitor this directory for changes, but the issue is how/what connections you have available on the server to which you want the files copied? FTP, SSH, web upload form?
The target server has both web-server(IIS and Apache) and ftp running. Ssh is an option but needs to be set up.
I'm not that familiar in vbscript as c#, but if I'm right they can do the same, but i rather skip the programming.
I havn't used rsync but i'll look it up.
The mechanism is the same, you would just need to implement it in the language you know.


Either one you would setup a service that will monitor changes in the directory of interest to you. Make sure to check whether the file is no longer being updated before starting transferring.

Is the upload process PHP based? You could at the conclusion of the upload trigger a subsequent upload to the remote server (make sure to respond to the browsing user first so that their session will not be tied up waiting for the transfer to complete).
I havn't tried building a services yet, can you recombine any sources looking into to help me get me started?

It is PHP, but I'll probably need to sync files back, and those files won't be uploaded via a php form, so I would like to use the same method both ways.
ASKER CERTIFIED SOLUTION
Avatar of arnold
arnold
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thank you, I will have a look at both building a service and the php solution and decide on which will be best.