Problem with RSYNC: FreeNAS to Synology

Status
Not open for further replies.
Joined
Jun 30, 2014
Messages
8
I've had a hell of a time with this and I'm hoping someone can help shed some light before I give up on rsync backups from my FreeNAS to a Synology.

Config (hardware shouldn't matter for this):
FreeNAS 9.3 (FreeNAS-9.3-STABLE-201509022158)
Synology DSM 5.2-5592 Update 4 (9/4/2015)
Router has DD-WRT with all ports open

Setup on Synology DS212j (192.168.1.170):
Single disk, single volume 'volume1'
Backup Services > Enable network backup service (NetBackup)
NetBackup share has folders within it for each of my FreeNAS shares ('backup-win' for this example)
Note: inbound rsync to Synology requires user 'root' or 'rsync' to intiate transfer.

Setup on FreeNAS (192.168.1.172):
User 'rsync' has home directory set to '/nonexistent'. More on this below.
Rsync Task setup as follows:
  • Path: /mnt/pool/backup-win
  • User: rsync
  • Remote Host: 192.168.1.170/volume1
  • Rsync mode: Rsync module
  • Remote Module Name: NetBackup/backup-win
  • Direction: Push
  • Recursive: Yes
  • Times: Yes
  • Delete: Yes
  • Quiet: Yes
  • Preserve permissions: Yes
  • Extra options: --log-file=/mnt/pool/backup-win/rsync_backup-win.log --stats -h -v -n
  • Enabled: Yes
Problem:
When I run my FreeNAS Rsync Task with the -n (test only) flag, it works fine and outputs a proper log file with the intended result. (Line 2)
Code:
2015/09/13 18:41:29 [34998] building file list
2015/09/13 18:41:29 [34998] created directory rsync@192.168.1.170/volume1::NetBackup/backup-win
2015/09/13 18:41:33 [34998] cd+++++++++ backup-win/
2015/09/13 18:41:33 [34998] cd+++++++++ backup-win/WINDOWSPC/
...ends successfully with transfer stats, etc.


When I remove the -n flag, FreeNAS' rsync task prepends the 'rsync' user's home directory before the user name, causing it to error out. In this case, it's only a backslash since the user 'rsync's home is '/nonexistent'.
Code:
2015/09/13 18:46:33 [36287] building file list
2015/09/13 18:46:33 [36287] rsync: mkdir "/rsync@192.168.1.170/volume1::NetBackup/backup-win" failed: No such file or directory (2)
2015/09/13 18:46:41 [36287] rsync error: error in file IO (code 11) at main.c(656) [Receiver=3.1.1]


To make it more apparent, see what happens if I change the home directory for the user 'rsync' and remove the -n flag:
Code:
2015/09/13 18:49:20 [37888] building file list
2015/09/13 18:49:20 [37888] rsync: mkdir "/mnt/pool/documents/FreeNAS_home/rsync/rsync@192.168.1.170/volume1::NetBackup/backup-win" failed: No such file or directory (2)
2015/09/13 18:49:25 [37888] rsync error: error in file IO (code 11) at main.c(656) [Receiver=3.1.1]


I've been wrestling with this for awhile (Synology DSM is a pain) but I'm almost there. My previous attempt was SSH keypairs, but that was a nightmare on DSM.

Any input on how you think I can address this behavior would be appreciated.
 
D

dlavigne

Guest
When I remove the -n flag, FreeNAS' rsync task prepends the 'rsync' user's home directory before the user name, causing it to error out. In this case, it's only a backslash since the user 'rsync's home is '/nonexistent'.

That sounds like a bug which may or may not have been fixed. Does upgrading to the latest SU resolve the issue? If not, please create a bug at bugs.freenas.org and post the issue number here.
 

adamjs83

Dabbler
Joined
Sep 3, 2015
Messages
40
Any luck getting this to work? I would like to setup the same thing.
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421

mihai

Dabbler
Joined
Dec 9, 2014
Messages
14
I know this is an old topic but I've been trying to get this to work as well, unsuccessfully. Has anyone successfully been able to rsync from FreeNAS to Synology?
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
I know this is an old topic but I've been trying to get this to work as well, unsuccessfully. Has anyone successfully been able to rsync from FreeNAS to Synology?

I know some people have and do, but I don't know specifics like what FreeNAS build, what Synology device, etc.
 

Spearfoot

He of the long foot
Moderator
Joined
May 13, 2015
Messages
2,478
I know this is an old topic but I've been trying to get this to work as well, unsuccessfully. Has anyone successfully been able to rsync from FreeNAS to Synology?
Yes, I use rsync to copy filesets between FreeNAS (9.10-STABLE) and my Synology (DSM 5.x) every day.

Make sure you have SSH encryption keys setup for attaching from the FreeNAS box to the Synology Diskstation. (I have this set up to work in both directions on my systems.)

Then make sure you dodge rsync's little 'quirks', which I've described in this thread. There's also a script you're welcome to use if you like:

https://forums.freenas.org/index.ph...rmissions-support-for-windows-datasets.43973/

If you want to use rsync tasks, here's how I have mine configured. Note that the hostname ('bertrand' in this case) must be resolvable, either via your hosts file or DNS, or you can use explicit IP addresses.
rsync-part-1.jpg


rsync-part-2.jpg
 

mihai

Dabbler
Joined
Dec 9, 2014
Messages
14
Spearfoot, thank you so much! Following your instructions I was able to rsync over ssh to Synology

I had trouble setting up the SSH keys until I found this guide, which I followed verbatim!

Those GUI rsync settings also work well.
 
Last edited:

Spearfoot

He of the long foot
Moderator
Joined
May 13, 2015
Messages
2,478
Spearfoot, thank you so much! Following your instructions I was able to rsync over ssh to Synology

I had trouble setting up the SSH keys until I found this guide, which I followed verbatim!

Those GUI rsync settings also work well.
Glad to hear it!
 
Joined
May 28, 2018
Messages
2
Hi all,
Old thread but I couldn't find guides to move data from my Synology 1813+ to my FreeNAS. I've set up an Rsync Module in FreeNAS with host allow is the IP of the Synology. I got the error: 'Network backup service is disabled at the destination.' Any help is much appreciated.
 
Joined
Dec 29, 2014
Messages
1,135
Old thread but I couldn't find guides to move data from my Synology 1813+ to my FreeNAS.

What sharing protocols does the Synology support? Rsynch isn't the way I would go. My suggestion would be to use the CLI in FreeNAS, mount the shares from the Synlogy (CIFS, NFS) and then copy the files over.
 
Joined
May 28, 2018
Messages
2
Thx Elliot. I’ve set up a share folder (windows), create user/group and the dataset for it to do the copy using Robocopy, which at times behaves strangely. I’ve read into rsync and it sounds promising as it would only mirror the two servers. I’ve read the push/pull set up for two FreeNAS Servers and tried to set up the push set up in the Synology but received the error I mentioned.
 
Joined
Dec 29, 2014
Messages
1,135
Sorry, I thought you were trying to migrate instead of back up. I misread your post.
 
Status
Not open for further replies.
Top