Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Here's my situation, I have website "A" sitting behind a intranet firewall, inaccessible to the people outside the intranet. I intend to have a outsourced developer work on "A", but he's not able to access it and I can not provide him access to the intranet. So my plan is set up a website "B", that syncs with "A"'s files and database, "B" of course is accessible to the world. My intention is that any changes on "B" would be immediately reflected on "A", likewise any changes on "A" would also be immediately reflected on "B" (a dropbox style sync relationship).

"A" and "B" both are running on linux server, I have root access on "A". I assume "A" would have to initiate the sync always, since "B" can not access "A" from the outside.

Is this possible? if so how would I achieve it?

share|improve this question
add comment

2 Answers

up vote 1 down vote accepted

Download OwnCloud (http://owncloud.org/) and host it on B. Install the client in A and setup filesyncing to whichever folders are of concern (e.g. /var/www/ ). OwnCloud will take the last edit time and update both ends to the latest file version (to prevent mistakes, the tolerance for system time differences is 2 seconds).

OwnCloud works in a very similar manner to DropBox but you have full control and privacy. You can also sync ANY folder in your local directories.

I use this personally to sync folders on my remote server, my home server and my office machine (which is behind a firewall). It even has a nice web UI that allows text editing and also an android app. Most importantly, the limit is whatever you decide to set.

share|improve this answer
    
Sounds like a good idea, what about the mysql database though? is there any tool to sync the database as well? –  KoKo May 4 '12 at 16:00
    
you might want to consider syncing mysql through a native method like replication (dev.mysql.com/doc/refman/5.0/en/replication.html) –  Reuben L. May 4 '12 at 16:03
    
by the way, check out the demo of owncloud here: demo.owncloud.org/files/index.php –  Reuben L. May 4 '12 at 16:04
add comment

There's a tool called "unison" that can achieve this; it requires accounts on both machines and an SSH login between them.

share|improve this answer
    
Thanks, Can it sync mysql database as well? –  KoKo May 4 '12 at 16:02
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.