How do you guys think i should go along replicating (basically copying) an uploaded file from one server to another (same network I believe) automatically (be it php or another language)? Possibly using PHP's built in FTP functions or something? Basically we've got two servers behind a load balancer and would like to be able to access the file from either server.
Have any of you had this problem or, more rightly named, task?
It'll be on linux servers running through ThePlanet if that helps at all.
Replicating an uploaded file from one server to another
Moderator: General Moderators
- Christopher
- Site Administrator
- Posts: 13596
- Joined: Wed Aug 25, 2004 7:54 pm
- Location: New York, NY, US
I'm thinking probably an FTP transfer using PHP since it needs to be done immediately.
I'll look into the rsync method as well and post what I do for future reference.
I'll look into the rsync method as well and post what I do for future reference.
Last edited by phice on Thu May 25, 2006 11:18 am, edited 1 time in total.
- Christopher
- Site Administrator
- Posts: 13596
- Joined: Wed Aug 25, 2004 7:54 pm
- Location: New York, NY, US
Now I've got the complete idea for how it's going to be set up.
I've got one linux machine where the uploads will be uploaded onto through an upload box on the website. There are two windows machines that are basically twins and need to have said uploaded file on both servers in the same location. How do you guys suggest I go about doing this? You guys have said Rsync but I have no clue how to set that up on this type of setup.
I've got one linux machine where the uploads will be uploaded onto through an upload box on the website. There are two windows machines that are basically twins and need to have said uploaded file on both servers in the same location. How do you guys suggest I go about doing this? You guys have said Rsync but I have no clue how to set that up on this type of setup.
- Christopher
- Site Administrator
- Posts: 13596
- Joined: Wed Aug 25, 2004 7:54 pm
- Location: New York, NY, US