I am attempting to get rsync with ssh to work for transferring files from a cygwin (windows 7) client to a Linux (slackware) server. I have a straight rsync (without ssh) working fine. I am attempting to use ssh with rsync because I read somewhere on the internet that the cygwin etc/fstab file with "noacl"
Code:
none /cygdrive cygdrive user,noacl,posix=0 0 0
only works with ssh and that the noacl part of the statement will get rid of all of the permission denied errors. And I do want to get rid of the rsync permission denied errors on the backup. I am starting a
on my Linux machine and I am using the following command on cygwin
Code:
c:\cygwin64\bin\rsync -vvv -e "/usr/bin/ssh" --groupmap -vvrtlz --log-file=/backup.log --password-file=/secret /cygdrive/c/Users lin@192.168.0.9::LinsLaptop
I have made various small variations on this command and got various different errors from rsync. At the moment the error that I am getting is that rsync cannot set the group ( I can't remember the exact wording of the error message).
EDIT: The error message is
Code:
2015/09/15 12:42:42 [8132] @ERROR: setgid failed
2015/09/15 12:42:42 [8132] rsync error: error starting client-server protocol (code 5) at main.c(1635) [sender=3.1.1]
2015/09/15 12:42:42 [8132] [sender] _exit_cleanup(code=5, file=main.c, line=1635): about to call exit(5)
However, the rsync process does create all of the Windows directories in the linux server backup directory before it fails, but they are all empty.
On cygwin the group is None (513 I think) I have tried setting it to Users (545 I think) to match the group of the user on the linux machine in /etc/passwd in cygwin but this did'nt work so I set it back. My rsyncd.conf and rsyncd.secrets files are in the users directory on the linux server and the secrets file has the correct permissions (600). Here is the contents of my rsyncd.conf file
Code:
lin@darkstar:/home/lin$ cat rsyncd.conf
pid file = /var/run/rsyncd.pid
lock file = /var/run/rsync.lock
log file = /var/log/rsyncd.log
strict modes = false
[OldLaptop]
path = /LindasBackups/Old_Laptop_Backup
comment = Lin's Backup area (requires authentication)
use chroot = false
uid = lin
gid = users
read only = false
auth users = lin
log file = /LindasBackups/Old_Laptop_Backup.log
secrets file = /etc/rsyncd.secrets
[LinsLaptop]
path = /LindasBackups/Backup-2015-09-14
comment = Lin's Backup area (requires authentication)
use chroot = false
munge symlinks = false
uid = lin
gid = users
read only = false
auth users = lin
log file = /LindasBackups/LinsLaptop_Backup.log
secrets file = /home/lin/rsyncd.secrets
lin@darkstar:/home/lin$
I think that I have ssh set up O.K. because I can connect (without a password using keys) from the cygwin client to the Linux server O.K. I tried to set up
on the cygwin client and that created a new privileged user but that seemed to create other problems elsewhere so I deleted that user from windows.
I am hoping that someone here can give me a detailed explanation of how to set up rsync with ssh because all of the posts that I have read on the internet on this subject seem very complicated. Especially a YouTube video called "rsync + ssh + cygwin - full and TOTAL instructions - Windows 2008 R2" that I thought would explain it well (or at least well enough for me to adapt it to windows 7).
Thank you for your time and if you need any further information I will be happy to supply it.