NETGEAR is aware of a growing number of phone and online scams. To learn how to stay safe click here.
Forum Discussion
pointer2null
Mar 15, 2015Aspirant
rsync from linux to readynas (duo)
I've had a readynas duo sat in the cupboard for a few years and have decided to put it to use as a secondary backup device.
The problem is I cannot seem to get rsync to connect. I've searched google but found no useful examples.
The file source is on a linux box running ubuntu 14.04
The readynas is an old duo but running the latest firmware. Not mods or additions at the moment.
I have enabled rsync on the sevices tab and added one share called backup that has rsync enabled.
When I try to rsync to the unit I get a error..
(example via cyggwin, but the results are the same on the linux box)
I have tried adding a rsync user but the results are the same.
Any ideas what I'm doing wrong?
The problem is I cannot seem to get rsync to connect. I've searched google but found no useful examples.
The file source is on a linux box running ubuntu 14.04
The readynas is an old duo but running the latest firmware. Not mods or additions at the moment.
I have enabled rsync on the sevices tab and added one share called backup that has rsync enabled.
When I try to rsync to the unit I get a error..
(example via cyggwin, but the results are the same on the linux box)
rsync -avz ~/testfiles NAS-76-22-B5:/backup
Gary@Gary-Laptop ~
$ ping nas-76-22-b5
Pinging nas-76-22-b5 [192.168.1.11] with 32 bytes of data:
Reply from 192.168.1.11: bytes=32 time=1ms TTL=64
Reply from 192.168.1.11: bytes=32 time=3ms TTL=64
Reply from 192.168.1.11: bytes=32 time=1ms TTL=64
Gary@Gary-Laptop ~
$ ./nastest.sh
ssh: connect to host nas-76-22-b5 port 22: Connection refused
rsync: connection unexpectedly closed (0 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at io.c(226) [sender=3.1.1]
I have tried adding a rsync user but the results are the same.
Any ideas what I'm doing wrong?
10 Replies
- StephenBGuru - Experienced UserWhat version of rsync are you running?
- pointer2nullAspirantrsync version 3.1.1 protocol version 31
- StephenBGuru - Experienced UserThe duo runs rsync version 3.0.9 protocol version 30 (at least the 4.1.14-T6 firmware does). So perhaps add --protocol=30. Perhaps also try w/o the -z.
is nastest.sh running rsync over ssh? (what is the port 22 error all about?) - pointer2nullAspirantnastest.sh is
rsync -avz ~/testfiles NAS-76-22-B5:/backup
After playing around, i found that enabling root ssh access I can get the command to work by specifying the user as root
rsync -avz ~/testfiles root@NAS-76-22-B5:/backup
But this prompts for a password. Not very useful for an automated backup. If I don't specify the user it asks for my password (gary) and since I don't have ssh access that doesn't work very well.
Adding a user under the rsync setup also doesn't seem to work.
Beginning to remember why this thing has spent the last two years in the cupboard. - StephenBGuru - Experienced UserCan you run the backup from the duo?
- pointer2nullAspirantpossibly but it wouldn't be of any use. I use rdiff-backup which the duo doesn't support. so my plan is to use the rdiff-backup to produce the primary backup set and then simply rsync this to the readynas.
- StephenBGuru - Experienced UserTwo thoughts - you could try using guest or nobody instead of root, and see if that avoids the password prompt.
Also, another way to get there would be to mount the NAS share on the ubuntu system with NFS. - pointer2nullAspirantWill give the guest account a try.
A mounted NAs share will work so will probably go with that since rsync seems lacking.
Thanks. - pointer2nullAspirantJust got back to working on this - can only cope with the Readynas in small doses due to it's utter cr@pness.
Have given up completely on the rsync, but a NFS mount seems to work well enough. Not too sure about how secure it is, but the readynas is on a private network so will do for now.
Thanks for all your help :)- HarmenInitiate
Found your post trying to do the same, here is how it works:
On NAS enable rsync on de share, I use the media share. Enable password en create a user and password for rsync.
On linux host use the rsync command:
rsync -rv /path/to/local/files rsync://username@ip-addres-nas:873/media
This will promt for the password for the user. If you use -rnv in stead og -rv you can check if it works without syncing (dry-run).
To use it in a script use the --password-file option. Create a file with only the password of the rsync user in it. Make this file only readable to de user that starts the script.
> chmod 700 password
In your script use:
/usr/bin/rsync -r /path/to/local/files rsync://username@ip-addres-nas:873/media --password-file=/path/to/password
Related Content
NETGEAR Academy

Boost your skills with the Netgear Academy - Get trained, certified and stay ahead with the latest Netgear technology!
Join Us!