?
Solved

Transfer files on folder change three-way

Posted on 2011-04-19
11
Medium Priority
?
318 Views
Last Modified: 2012-05-11
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.
0
Comment
Question by:Gudorian
  • 5
  • 3
  • 3
11 Comments
 
LVL 14

Expert Comment

by:Vinchenzo-the-Second
ID: 35423517
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
0
 
LVL 2

Author Comment

by:Gudorian
ID: 35423524
They are not in the same domain
0
 
LVL 14

Expert Comment

by:Vinchenzo-the-Second
ID: 35423577
Are the domains part of the same forest?
0
Simplify Active Directory Administration

Administration of Active Directory does not have to be hard.  Too often what should be a simple task is made more difficult than it needs to be.The solution?  Hyena from SystemTools Software.  With ease-of-use as well as powerful importing and bulk updating capabilities.

 
LVL 2

Author Comment

by:Gudorian
ID: 35423611
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.
0
 
LVL 14

Expert Comment

by:Vinchenzo-the-Second
ID: 35423634
Right, DFS is out of the question then...
0
 
LVL 81

Expert Comment

by:arnold
ID: 35423795
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?
0
 
LVL 2

Author Comment

by:Gudorian
ID: 35423899
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.
0
 
LVL 81

Expert Comment

by:arnold
ID: 35424023
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).
0
 
LVL 2

Author Comment

by:Gudorian
ID: 35424613
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.
0
 
LVL 81

Accepted Solution

by:
arnold earned 1600 total points
ID: 35424697
http://www.codeproject.com/KB/files/MonitorFolderActivity.aspx
http://www.codeproject.com/KB/files/CheckForZipFiles.aspx
http://www.programmersheaven.com/article/100445-Creating+a+Folder+Monitoring+Windows+Service+in+C%23/info.aspx

Are but a few examples.

You could setup a PHP page for internal use where your domain based windows 2008 will connect and check if there are files it should get and then retrieve them.
The push back can be done in the same way.  I.e. you have a process on the win2k8 that connects to a special PHP page and uploads files.  The issue is whether your PHP upload will handle an upload of a filename that already exists.
0
 
LVL 2

Author Closing Comment

by:Gudorian
ID: 35424844
Thank you, I will have a look at both building a service and the php solution and decide on which will be best.
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

New Windows 7 Installations take days for Windows-Updates to show up and install. This can easily be fixed. I have finally decided to write an article because this seems to get asked several times a day lately. This Article and the Links apply to…
Possible fixes for Windows 7 and Windows Server 2008 updating problem. Solutions mentioned are from Microsoft themselves. I started a case with them from our Microsoft Silver Partner option to open a case and get direct support from Microsoft. If s…
To efficiently enable the rotation of USB drives for backups, storage pools need to be created. This way no matter which USB drive is installed, the backups will successfully write without any administrative intervention. Multiple USB devices need t…
This tutorial will show how to configure a single USB drive with a separate folder for each day of the week. This will allow each of the backups to be kept separate preventing the previous day’s backup from being overwritten. The USB drive must be s…
Suggested Courses

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question