Nick Rozwadowski
Cadet
- 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:
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)
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'.
To make it more apparent, see what happens if I change the home directory for the user 'rsync' and remove the -n flag:
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.
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
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.