Page 1 of 2

Remote server Rsync to QNAP TS-439......?

Posted: Tue Oct 06, 2009 1:09 am
by gmax21
I've been struggling for a couple of weeks to get this set up I've asked for help my from server providers and they provided some but ultimately responded with 'Ask QNAP', so alas I'm here.

I'm not the most technically minded when it comes to Rsync to take it easy with me. lol

In the qnap admin I set it like follows:

Server type: Rsync
Port: 873
Network share: /home
Directory: home

When I test it with my credentials I get the following error:

The remote host or the destination directory does not exist, or a port error is encountered.

Well thats a rather vague description, I did search but didn't find anything that helped me much. the destination IP is correct and the directory exists. It's a Centos 5 with cpanel with /home as the main directory for website/cpanel contents. So I thought it would be a port error, I contacted the people who manage my server and they said the port was open, I tested it through http://www.yougetsignal.com/tools/open-ports/ and it said the port was closed, I then tested it with nmap/zenmap and it still didn't show the port as being open.

I turned the server firewall off and it still said the same, when I run the following command through a terminal it tells me it's open and server techs also tell me it's open.

csf -l | grep :873
143 6 348 ACCEPT tcp -- !lo * 0.0.0.0/0 0.0.0.0/0 state NEW tcp dpt:873
130 0 0 ACCEPT tcp -- * !lo 0.0.0.0/0 0.0.0.0/0 state NEW tcp dpt:873
137 0 0 ACCEPT tcp -- * !lo 0.0.0.0/0 0.0.0.0/0 state NEW tcp dpt:873
143 0 0 ACCEPT udp -- * !lo 0.0.0.0/0 0.0.0.0/0 state NEW udp dpt:873

As you can see it's set to accept and UDP incoming is apparently all set correctly.

I've set up port forwarding on my local network also.

Is there something I'm missing here? Does anyone have any other ideas?

I know that I could also go the snapshot rout, but I'd rather keep it simple at the moment and make sure it can be done this way before I start making modifications to the QNAP box.

(I have dedicated servers and not shared hosting)

Thanks for any help and advice given.

Re: Remote server Rsync to QNAP TS-439......?

Posted: Tue Oct 06, 2009 1:32 am
by petur
I'm a bit confused by your description. The topic suggests you try to let a remote server rsync to your NAS, and the text makes me believe you try to contact the remote server.

Maybe state clearly what the setup is (which type of box sits where) and in what direction you try to connect things.

I would assume you try to rsync your server to your NAS at home (offsite backup). Is that correct?

Re: Remote server Rsync to QNAP TS-439......?

Posted: Tue Oct 06, 2009 1:37 am
by gmax21
Sorry for the vague description, I thought the title was clear but thats my mistake I suppose.

The QNAP TS-439 was purchased mainly to handle backups from remote servers, the remote server hosts client websites in addition to our own network of website. It's important that we have these backed up and thats why the QNAP Box was ideal. (Originally I had a ubuntu machine set up to handle this, but due to a HD failure I needed an alternative).

So I want the QNAP box to back up the contents of my remote server which is managed by EUKHost.

Does that better explain my objective?

Re: Remote server Rsync to QNAP TS-439......?

Posted: Tue Oct 06, 2009 6:27 pm
by petur
Ok, it's what I thought it is ;)
So here's a checklist of things to verify.

On the home network side:
- if you have a dynamic IP, get a DDNS (best configured in your router). Testing is not so easy, perhaps forward port 80 on the router to your NAS and see if you can reach the webserver.
- forward port 873 of your router to your NAS
- on your NAS, check the Allow remote Rsync server to back up data to NAS box on the remote replication page

On the webserver side:
- configure rsync to connect to your DDNS name, port 873

Now the webserver should be able to backup to your NAS using rsync.

Re: Remote server Rsync to QNAP TS-439......?

Posted: Tue Oct 06, 2009 7:38 pm
by gmax21
Hi Petur.

Thanks for your help.

All of the home side is fine and set up (I thought I'd done that part right, lol), my IP doesn't change often as it's a permanent Broadband Connection but I see why you recommend the DDNS.

Now the webserver side, am I right in assuming we're telling the server to push the data to my NAS?

I ask because I was under the impression that Rsync pulled the data normally? Or can it be set up either way? I presumed QNAP would connect and pull it down?

Thanks for your help and patience :D , I usually ask the guys who manage our server but they couldn't get it working, they were confused by how the QNAP box works I believe.

I'm not sure how often official QNAP developers read these forums, but as a feature request, I know some FTP programs can be set up on a schedule to to perform synchronized incremental and differential backups I suppose similar to how RSYNC works but via SFTP/FTP. Perhaps something like this for QNAP would be cool for those idiots like me. ;-) It sure would be easier to set up. lol

Re: Remote server Rsync to QNAP TS-439......?

Posted: Tue Oct 06, 2009 8:39 pm
by petur
I'm not an rsync expert at all, but as far as I know rsync just pushes data around, not pull. So on your webserver you should have a cron job that starts an rsync job to push a backup to your NAS. The NAS will act as rsync server to receive the data.

Re: Remote server Rsync to QNAP TS-439......?

Posted: Tue Oct 06, 2009 9:38 pm
by gmax21
I presume you would then just set up a user on the QNAP with access to the folder you want the back up to be made to?

Thanks for all your help. :D

Re: Remote server Rsync to QNAP TS-439......?

Posted: Tue Oct 06, 2009 10:20 pm
by petur
yes, set up a share, user and password, and use that on the webserver (Never actually done this myself this way)
Note that this will not use SSH so if you need encryption you probably need to set up a tunnel too.

Re: Remote server Rsync to QNAP TS-439......?

Posted: Tue Oct 06, 2009 10:27 pm
by gmax21
How would you create a tunnel on the QNAP?

I presume you would do it through ssh just like one a linux system?

Thanks again, you've been a great help! :-)

Re: Remote server Rsync to QNAP TS-439......?

Posted: Wed Oct 07, 2009 2:38 pm
by petur
I think the following articles cover the SSH topic
http://www.ssh.com/support/documentatio ... rding.html
http://magazine.redhat.com/2007/11/27/a ... -software/

To allow SSH at home, you forward port 22 (or maybe another random port to avoid script kiddies) on your router to port 22 on the NAS (and enabled on your NAS)

On the server you'll need to forward some random port >1024 to port 873 on your NAS. This is all a bit more work but only needs to be set up once. Involves creating keys and a config file.

Re: Remote server Rsync to QNAP TS-439......?

Posted: Wed Nov 04, 2009 4:35 am
by gmax21
Hi Petur.

Thanks again for all your help, I've been rather busy away form the computer recently so not had much chance to do anything.

I passed a link for this thread to the people who manage my server - EUKHost, I asked them to help and they had been trying to assist me in setting this up also, they have had access to the QNAP admin also. I then just go this reply form them, I'd hoped this thread would get them the information they need but:

They were having problems and said they wasn't sure how to get it working:
Right.... Well what information is it your looking for so that I can ask the correct question to get the answer you need?

I really don't get rysnc in any technical sense so I'm not sure what to ask.

Kindest Regards
Tim
And their last reply:
Hello Tim,
They didn't provide the exact solution how to configure the backup on Qnap storage using rsync method.
I presume they are looking for a step through guide on how to set it all up, I had a quick google but didn't find anything specific to my model. I don't suppose you know any links or documentation I could pass them?

Thanks again. :-)

Re: Remote server Rsync to QNAP TS-439......?

Posted: Wed Nov 04, 2009 9:24 am
by P3R
Rsync can be used for push (normal Qnap use) or pull. I think you are looking for a description of setting up pull operation from the Qnap. I have a system that I don't dare to touch and would like to use the Qnap for pull as well so if you ever get it to work, please tell us here :D

Re: Remote server Rsync to QNAP TS-439......?

Posted: Thu Dec 05, 2013 9:07 pm
by technophil
petur wrote:I think the following articles cover the SSH topic
http://www.ssh.com/support/documentatio ... rding.html
http://magazine.redhat.com/2007/11/27/a ... -software/

To allow SSH at home, you forward port 22 (or maybe another random port to avoid script kiddies) on your router to port 22 on the NAS (and enabled on your NAS)

On the server you'll need to forward some random port >1024 to port 873 on your NAS. This is all a bit more work but only needs to be set up once. Involves creating keys and a config file.
Hi,
i have the same problem with my QNAP!
I am trying to rsync a folder of my QNAP (4.0.3 OS) to another server (Mac OS 10.9) but i can't do that!
I am using the graphic interface of my QNAP and i am shure to use the correct parameters! Look at the image:

http://img5.imageshack.us/img5/2949/mq5j.jpg

The message error is: " the remote folder does not exists or wrong port used ... ".

But if use the same parameters (local lan ip server target and port 22) in a script.sh everything works:

#!/bin/bash
rsync -ave "ssh -p 22" --progress --delete /share/MD0_DATA/temp username@local_lan_ip:/target > /share/MD0_DATA/log_$(date +%d.%m.%Y_%H.%M.%S).log


In practice i cannot do the remote rsync replication folder using the graphic interface!
What am I doing wrong? :'

I also wrote this topic: http://forum.qnap.com/viewtopic.php?f=15&t=87776

Thank you!

Re: Remote server Rsync to QNAP TS-439......?

Posted: Thu Dec 05, 2013 11:50 pm
by bruceleeon
Why not use cpanel's built in backup functionality and configure the backup destination as FTP. This will backup each account daily and with a quick modification to the config file for the backup, you can backup your system settings. I currently have my cPanel server configured to backup to two different FTP locations daily. All accounts are backed up, MySQL for user and entire dbs, as well as the system settings.

Re: Remote server Rsync to QNAP TS-439......?

Posted: Thu Dec 05, 2013 11:57 pm
by technophil
I prefer using rsync because i have more than 500GB of data to backup!
How can i do that with FTP as incremental backup?!