Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
feasibility of data mirroring scenario?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Jarhead
Guru
Guru


Joined: 26 Mar 2004
Posts: 474

PostPosted: Thu Dec 06, 2007 10:15 pm    Post subject: feasibility of data mirroring scenario? Reply with quote

Hey all, I am trying to set up a data mirroring system on my home network. Here is my proposed scenario:

My network consists of a home server, 2 laptops (which rove on different networks) and a workstation. I want to have certain directories sync with the other machines through the server.

I want to be able to mirror files periodically through the server. This would be simple enough if the machines remained on the same network, but the laptops, the main source of file updates, do not. I was considering using a dyndns account for each so that they could be mounted and mirrored by the server when on various networks, but that would cause problems when they are on the home network and behind a router.

The router itself has dyndns functionality built in, which is nice, but I am unsure about how to go about mounting machines behind it, as all have the same external IP. I was doing some research on port forwarding, but am unsure about how to implement it in this scenario. Again, the laptops being on different networks would complicate this I think...

Is this sort of thing possible? I would think that it should be, but there are a lot of variables in this setup that could prevent implementation. Thanks for your input.
_________________
Hats off to everyone in leadership, developmental, or administrative capacities for Gentoo Linux. Your hard work is very much appreciated.
Back to top
View user's profile Send private message
amightywind
Tux's lil' helper
Tux's lil' helper


Joined: 01 Jun 2004
Posts: 137
Location: Andover, MN USA

PostPosted: Fri Dec 07, 2007 1:05 am    Post subject: Reply with quote

rsync is made for exactly this. They cover something close to your scenario in the man page. I use it to mirror most of my home directory to an eSATA drive, but it is also network aware and uses a variety of transports.
_________________
amightywind
Back to top
View user's profile Send private message
Jarhead
Guru
Guru


Joined: 26 Mar 2004
Posts: 474

PostPosted: Fri Dec 07, 2007 4:28 am    Post subject: Reply with quote

Agreed. I plan on writing a bash script that would mount the remote directory via sshfs, sync the relevant files to the server, sync the sum of the updates back to the machines, unmount, and then exit (running every 10 mins or so). That is the easy part.

My question concerns how to get those remote directories mounted. The router is the big choke-point I think.

Here is some more background information about my setup. I re-read it, and think that some context would help.

My wife and I are both in school, and use our laptops to take notes, do research, etc. This means that they travel to several different networks on a regular basis.

The server in question has a static IP address behind the router, and will serve in this case to do the majority of the grunt work. There is also a workstation that remains on the home network.

The router itself is a Belkin wireless G, with dyndns functionality built in. I am able to ping its url, but cannot mount any machines behind it because of port issues (same external IP using port 22). I considered every machine having its own dyndns, but the same issue applies.

This is my dilemma. If I could figure out how to do one aspect, the rest should fall into place...
_________________
Hats off to everyone in leadership, developmental, or administrative capacities for Gentoo Linux. Your hard work is very much appreciated.
Back to top
View user's profile Send private message
Anarcho
Advocate
Advocate


Joined: 06 Jun 2004
Posts: 2970
Location: Germany

PostPosted: Fri Dec 07, 2007 7:41 am    Post subject: Reply with quote

Just a comment on rsync: Better use unison because it is bidirectional.
_________________
...it's only Rock'n'Roll, but I like it!
Back to top
View user's profile Send private message
Jarhead
Guru
Guru


Joined: 26 Mar 2004
Posts: 474

PostPosted: Fri Dec 07, 2007 8:32 pm    Post subject: Reply with quote

I was thinking of using unison, but chose rsync because of stability and procedural issues. Since the mirroring would be taking place on at least three machines, my plan would be for the server to pull the relevant files from the clients first and then move the sum of the changes back to the clients. That way, any updates would make it to the other machines, not just the server.
_________________
Hats off to everyone in leadership, developmental, or administrative capacities for Gentoo Linux. Your hard work is very much appreciated.
Back to top
View user's profile Send private message
Jarhead
Guru
Guru


Joined: 26 Mar 2004
Posts: 474

PostPosted: Sun Dec 09, 2007 8:47 am    Post subject: Reply with quote

bump
_________________
Hats off to everyone in leadership, developmental, or administrative capacities for Gentoo Linux. Your hard work is very much appreciated.
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 23082

PostPosted: Sun Dec 09, 2007 4:13 pm    Post subject: Reply with quote

You need to configure the router to forward an external port to the internal machine. The method to do this varies by router. Check the documentation for references to "port forwarding", "NAT", or anything about getting online games to work. Many online games, particularly older ones (3-7 years), use protocols that require some configuration on the router to work properly. As a last resort, you could designate the internal host as the DMZ, but then it will receive all unhandled traffic, so it would need its own firewall.

Once you can forward a port, pick a port number and forward it to the internal machine. Then tell ssh on the laptops to use that port when connecting to the public IP of the router.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum