Hi
Situation is this: I have two Amahi HDAs that locate in different local networks. Both are connected to internet.
They are configured to be allmost identical to each other. Only differences are local domains. The goal is to backup one HDAs shares to another incrementally and I suppose rsync would be right tool for that.
Am I right that I need to make a VPN connection between these two?
So from what I understand you basically want the two machines to be mirrors of one another. If there are changes on your brother's machine, then you want them downloaded to your machine incrementally. If there are changes on your machine, then you want your changes uploaded to your brother's machine incrementally.
Am I right so far?
This can be done a couple of ways but your ways are partially incorrect and I'll explain why. First, I'll tell you what's wrong and then suggest alternatives which would suit your needs that don't require a GUI.
I have tried running these commands but neighter founds the destination server
Code: Select all
rsync -avz -e "ssh -p 1194" ~/var/hda/files/ <username>@<mydomain>.yourhda.com:var/hda/files/
Code: Select all
rsync -avz ~/var/hda/files/ <mydomain>.com:var/hda/files/
I tried to create VPN connection between the two servers but I probably failed in that too.
First let me tell you that SSH is not VPN. SSH works with TCP and VPN (at least the one used by Amahi), openvpn uses UDP. So the two wouldn't mix or match. Second, even if the command above would hypothetically work then you would be placing the files in the wrong place. For instance if your user is bill and you sent it to
bill@bill.yourhda.com:var/hda/files/ then on the server you're uploading to it would place those files under /home/bill/var/hda/files/. You need the root forward slash if that is your intent.
There's two ways I can think of which would go about this, both require SSH. The first is to poke a hole for SSH in your router for both your's and your brother's HDA. Then you would connect via SSH using rsync with ssh keys. It would be best to use a cron job every so often (I run my cron job twice a week). I could explain the whole process to you but
this guy does a pretty good job.
The other way would still involve rsync and SSH but instead of poking a hole in your router to port 22 on your HDA connect via VPN first. You could use the article above and on top of that use the VPN settions outlined in the generic Linux client in the
Amahi wiki.