1

I'm trying to define a RSync Backup Job in Hyper Backup of Synology DS to backup my files from Synology DS to a Linux Server running Ubunut 14.04.

Here is a copy of my rsync.conf file

use chroot = true
read only = false
uid = rsync-user
gid = rsync-user

transfer logging = true
log format = %h %o %f %l %b
log file = /var/log/rsyncd.log

[MyBackup]
path = /data/backup
comment = Backup directory
auth users = mysyncuser
secrets file = /etc/rsyncd.secrets

"rsync-user" is a local user on Linux Server who has login capabilities:

rsync-user:x:10001:10001::/home/rsync-user:/bin/bash

And is the OWNER of "/data/backup"

The Problem is once I trigger the Backup in Synology DS, the Server is not able to create the "BackupFolder" Folder under "/data/backup" and shows these messages:

2016/08/10 17:36:37 [29598] rsync on MyBackup/BackupFolder/synobkpinfo.db from mysyncuser@pD9FXXXXX.dip0.t-ipconnect.de (217.250.xxx.xx)
2016/08/10 17:36:37 [29598] building file list
2016/08/10 17:36:37 [29598] rsync: change_dir "/BackupFolder" (in MyBackup) failed: No such file or directory (2)
2016/08/10 19:36:38 [29599] connect from pD9FXXXXX.dip0.t-ipconnect.de (217.250.xxx.xx)
2016/08/10 17:36:38 [29599] rsync on MyBackup/BackupFolder from mysyncuser@pD9FXXXXX.dip0.t-ipconnect.de (217.250.xxx.xx)
2016/08/10 17:36:38 [29599] building file list
2016/08/10 17:36:38 [29599] rsync: link_stat "/BackupFolder" (in MyBackup) failed: No such file or directory (2)
2016/08/10 17:36:38 [29599] sent 101 bytes  received 26 bytes  total size 0

If I change the uid section to root, everything runs properly:

uid = root

Any help is highly appreciated.

0

You configure rsync with chroot. User rsync-user has home directory /home/rsync-user and has access there only (when chroot is enable). Add symbolic link at user's home directory to /data/backup directory:

ln -s /data/backup /home/rsync-user/backup

And change path to /home/rsync-user/backup

I think the log file /var/log/rsyncd.log must be changed the same way.

2
  • still getting same message: root@h2343455:/home/rsync-user# ls -ltra total 16 drwxr-xr-x 4 root root 4096 Aug 10 19:35 .. drwx------ 2 rsync-user rsync-user 4096 Aug 10 19:36 .cache -rw------- 1 rsync-user rsync-user 86 Aug 10 20:09 .bash_history lrwxrwxrwx 1 rsync-user rsync-user 12 Aug 10 20:29 backup -> /data/backup drwxr-xr-x 3 rsync-user rsync-user 4096 Aug 10 20:29 . – nicmon Aug 10 '16 at 18:34
  • I had to ignore the message on first step of Job Setup in Hyper Backup. The Folder has been created successfully at the end of wizard and everything works properly now. Thank you very much. – nicmon Aug 10 '16 at 18:41
0

This line doesn't look right

2016/08/10 17:36:37 [29598] rsync: change_dir "/BackupFolder" (in MyBackup) failed: No such file or directory (2)

I see nothing in your logs that would have created /BackupFolder, but rsync does try to enter it. I'm not sure why this is happening, but perhaps you should look into that. Perhaps try creating the "BackupFolder" in advance and set the proper ownership on it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.