Backup from hda to hda with rsync?

jokinpaha
Posts: 7
Joined: Tue Sep 27, 2011 6:13 am

Backup from hda to hda with rsync?

Postby jokinpaha » Wed Sep 28, 2011 6:40 am

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?

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.

User avatar
radioz
Posts: 406
Joined: Tue Nov 24, 2009 1:07 pm

Re: Backup from hda to hda with rsync?

Postby radioz » Wed Sep 28, 2011 8:46 am

A different solution would be to use CrashPlan on each of those machines and configure it to backup to the other machine. That is what I use on my network (although I only have one hda). I find Crashplan easy to use.
It is pretty painless to set up.

Crashplan is free if you don't want to store backups on their cloud. Works really well.

jokinpaha
Posts: 7
Joined: Tue Sep 27, 2011 6:13 am

Re: Backup from hda to hda with rsync?

Postby jokinpaha » Thu Sep 29, 2011 12:36 pm

OK. So, I have installed CrashPlan but at the point it is supposed to start up nothing happens. I have tried installing it on two different machines and the result is the same.

User avatar
radioz
Posts: 406
Joined: Tue Nov 24, 2009 1:07 pm

Re: Backup from hda to hda with rsync?

Postby radioz » Thu Sep 29, 2011 4:05 pm

As far as I know, Crashplan is a standalone app. On your hda (or any other system you have installed it on), open up a terminal and type:
CrashPlanDesktop

This should bring up the GUI for it.
If you want to back up to one (or more) of your other machines, you need to install CrashPlan on those machines too. Once you do that, each installation can see the others on the network.

jokinpaha
Posts: 7
Joined: Tue Sep 27, 2011 6:13 am

Re: Backup from hda to hda with rsync?

Postby jokinpaha » Fri Sep 30, 2011 1:30 am

Now I got it working. But CrashPlan doesn't really serve my purposes because if I select backing up to friends the files arrive crypted. If I select CrashPlan Central as my destination I will have to got to desktop everytime I want to restore files on second HDA. And i'm running these servers headless. CrashPlan software just requiers too many moving parts in this equation.

User avatar
radioz
Posts: 406
Joined: Tue Nov 24, 2009 1:07 pm

Re: Backup from hda to hda with rsync?

Postby radioz » Fri Sep 30, 2011 11:09 am

I'm a little confused about what your goal is. Are you trying to share files between machines?

For backups to other machines on your network, choose 'Another Computer' as the destination.

Yes, the backups from one machine are encrypted when stored on another machine. But that provides security. You can restore backup files back to the original machine again easily.

If you are after file sharing, I guess you could use DropBox for that.

jokinpaha
Posts: 7
Joined: Tue Sep 27, 2011 6:13 am

Re: Backup from hda to hda with rsync?

Postby jokinpaha » Sat Oct 01, 2011 4:22 pm

This is the scenario: I have one HDA at my brothers and another almost identical at my house.

Goal is to have same files on both of them for:
1. Backup
2. Streaming HD video over internet is pain in the hiney, even tho we have 10/10Mbps and 110/2Mbps connections. So same files should be available at both ends.

And copying files should be incremental so we wouldn't have to upload/download several terabytes of data every time we make changes in our primary HDA.

User avatar
radioz
Posts: 406
Joined: Tue Nov 24, 2009 1:07 pm

Re: Backup from hda to hda with rsync?

Postby radioz » Sun Oct 02, 2011 12:13 am

Well CrashPlan certainly works for backups, but it probably won't work for file sharing.

CrashPlan does use incremental backups, so it minimizes data transfers.

Have you thought about something like DropBox or another sharing service for your shared video files?

jokinpaha
Posts: 7
Joined: Tue Sep 27, 2011 6:13 am

Re: Backup from hda to hda with rsync?

Postby jokinpaha » Sun Oct 02, 2011 3:43 am

Yes I have thought about DropBox and it would do the trick but it is way too expensive. Also as I said earlier I'm running these servers headless so it makes using DropBox a nightmare. The point of the other "main" server is to free disk space (we now have multiple copies of same files on many computers) and also act as a printer server.

rsync would be the way to go because it makes incremental copies, can be run as a cron job and can be used in terminal (putty or ajaxterm) so I wouldn't need phsically connect a display or a keyboard to either of these HDAs.

sag47
Posts: 43
Joined: Sun Feb 13, 2011 9:27 am

Re: Backup from hda to hda with rsync?

Postby sag47 » Sun Oct 02, 2011 5:20 pm

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.

Who is online

Users browsing this forum: No registered users and 41 guests