rsync to Synology DS215j

Trying to rsync using a separate user “rsync” didn’t work (DSM 6.0.2). I got the error message:

ERROR: module is read only

Workaround: destination directory has to start with “/volume1/…” (not “/var/services/…”)

Full command:

rsync -avz -e ssh /data/dir/ rsync@hostname:/volume1/backup_dir

To get it working using an ssh public key (didn’t work at first):

On the PC:

  1. Generate a key pair:
    ssh-keygen -t rsa -b 2048
  2. Copy public key to NAS:
     ssh-copy-id rsync@hostname

On the NAS:

  1. in /etc/ssh/sshd_config (don’t know if this is necessary):
    PubkeyAuthentication yes
    AuthorizedKeysFile .ssh/authorized_keys
  2. Make sure that the rsync home directory has the correct permission settings (also check the .ssh directory as well as the file authorized_keys):
    chmod 755 /volume1/homes/rsync
    chmod 700 /volume1/homes/rsync/.ssh
    chmod 600 /volume1/homes/rsync/.ssh/authorized_keys

Leave a Reply

Your email address will not be published. Required fields are marked *

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.