× NETGEAR will be terminating ReadyCLOUD service by July 1st, 2023. For more details click here.
Orbi WiFi 7 RBE973
Reply

rsync from linux to readynas (duo)

pointer2null
Aspirant

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)


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?
Message 1 of 11
StephenB
Guru

Re: rsync from linux to readynas (duo)

What version of rsync are you running?
Message 2 of 11
pointer2null
Aspirant

Re: rsync from linux to readynas (duo)

rsync version 3.1.1 protocol version 31
Message 3 of 11
StephenB
Guru

Re: rsync from linux to readynas (duo)

The 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?)
Message 4 of 11
pointer2null
Aspirant

Re: rsync from linux to readynas (duo)

nastest.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.
Message 5 of 11
StephenB
Guru

Re: rsync from linux to readynas (duo)

Can you run the backup from the duo?
Message 6 of 11
pointer2null
Aspirant

Re: rsync from linux to readynas (duo)

possibly 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.
Message 7 of 11
StephenB
Guru

Re: rsync from linux to readynas (duo)

Two 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.
Message 8 of 11
pointer2null
Aspirant

Re: rsync from linux to readynas (duo)

Will give the guest account a try.

A mounted NAs share will work so will probably go with that since rsync seems lacking.

Thanks.
Message 9 of 11
pointer2null
Aspirant

Re: rsync from linux to readynas (duo)

Just 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 🙂
Message 10 of 11
Harmen
Initiate

Re: rsync from linux to readynas (duo)

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

 

 

 

Message 11 of 11
Top Contributors
Discussion stats
  • 10 replies
  • 9016 views
  • 1 kudo
  • 3 in conversation
Announcements