Install the app
How to install the app on iOS

Follow along with the video below to see how to install our site as a web app on your home screen.

Note: This feature may not be available in some browsers.

DSM 7.0 Rsync (via ssh) on DSM 7

2
0
NAS
DS216j
Operating system
  1. Linux
  2. Windows
Mobile operating system
  1. Android
Last edited:
Hi there,

I'd like to ask how / whether ppl have rsync running on DSM 7 - since apparently some changes happened and I find contradicting information.
What I'd ask you to share is, what settings you use, whether you use rsync via ssh, daemon, specific rsync user, from or to synology, whether the user is administrator.

Following this, which should be fairly official, if I want to use rsync from a non synology device, I need to activate rsync accounts, and assign it to the user I wanna use. This only allows me to user password authentication though?

My situation
I have a VPN running between my LAN and my parents LAN, I moved my DS216j there and basically installed it fresh (new disks and so on).
On my end I used an old desktop computer, and have Unraid running. The laptops / desktops on each end are backed up onto the server with incrementals and regular fulls, and I'm mirroring the backups to the other end of the vpn (Unraid <-> DS).
For now I've mounted the DS shares on unraid and basically ran rsync "local", which works, but isn't optimal (I believe?).

I have accounts specifically for the backup syncing on both ends.
- Had to make the account on DS Admin to be able to SSH into it. I setup publickey authentication (and planning to disable password auth and as well as sudo once it works).
- SSH does work (passwordless)
But a command like
rsync --dry-run -h --progress -e 'ssh -p <DS-ssh-port>' /unraid/backup <backupuser>@<myDS-IP>:/volume1/backup-mirror/
Ends up asking for my password, and then returns
Code:
Permission denied, please try again.
rsync: connection unexpectedly closed (0 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at io.c(235) [sender=3.1.3]

I tried with rsync user assigned, with rsync-account disabled. I can tell it's using the ssh password, because if I mistype its asking again, if I enter the correct one - permission denied. Its not accepting the password of the rsync-account. I can also use the publickey to get directly to the permission denied.
So I wonder? What permission am I missing? (This is an admin account)

I've actually just managed to get something else:
rsync --dry-run -ah --progress /<unraid>/>backup> <backupuser>@<IP>::backup-mirror
It asks for a password, accepts the one I assigned to the rsync account, and then .. actually executes.

Sooo I guess thats the "nonssh" versionm but why does it not work with a path? (only modulename of shared folder?)
I wanted to setup LuckyBackup, which wants to connect via ssh though, and can only handle publickey auth - not password auth. Still any chance for this? I guess "encrypted rsync" in Synology means "rsync via ssh... and "from non-Synology NAS client, you have to create rsync accounts on the destination Synology NAS ..." It has the same name as my DS user, how would I assign it authorized_keys ?
 
Last edited:
I eventually got it working - a bit, somehow.

- Cannot use publickeyauth
- Saving the password in a passwordfile (mounted appdata-folder of container that runs rsync / luckybackup, also gotta make sure only the luckybackup user has access rights chmod 600)
- Can only access module (shares are presented as modules)
- Gotta use specific rsync-user accounts (and maybe different password)
- follow the synology guide first to "enable" all of that

- SSH is not really necessary...
 
Upvote 0

Create an account or login to comment

You must be a member in order to leave a comment

Create account

Create an account on our community. It's easy!

Log in

Already have an account? Log in here.

Popular tags from this forum

Similar threads

Thanks guys, poking around in other articles and they also configured the backup jobs with Rsync. The...
Replies
4
Views
1,535
  • Question Question
I want to set up a backup task from a remote Windows 7 PC to my Synology NAS. I have set up OpenVPN and...
Replies
0
Views
889

Thread Tags

Tags Tags
dsm ssh

Welcome to SynoForum.com!

SynoForum.com is an unofficial Synology forum for NAS owners and enthusiasts.

Registration is free, easy and fast!

Trending content in this forum

Back
Top