Transferring from Windows to Linux with rsync

后端 未结 3 1510
面向向阳花
面向向阳花 2021-02-10 08:46

noob here,

I\'m trying to transfer a file using rsync from windows to linux. I have this code, but I\'m getting an error

rsync -avz -e ssh C:\\users\\fil         


        
3条回答
  •  天涯浪人
    2021-02-10 09:44

    Writing the right rsyncd.conf is a little bit complicated.

    I get the error message

    @ERROR: chdir failed rsync error: error starting client-server protocol (code 5) at main.c(1296) [receiver=2.6.8]

    and

    2012/06/10 14:59:43 [9252] rsync: chdir /cygdrive/d failed : No such file or directory (2)

    Because I miss the "use chroot = false" directive in my rsyncd.conf

    Here is an example of rsyncd.conf:

    log file        = c:/rsync.log
    auth users      = backup
    secrets file    = /cygdrive/c/Program Files/RSync/rsyncd.secrets
    
    [backup]
    comment         = Backup this host
    path            = /cygdrive/d
    use chroot      = false
    strict modes    = false
    read only       = false
    transfer logging = yes
    hosts allow     = 192.168.2.252
    

    Be sure the rsync.log file is created/changed after restart service, if it's not done, you have some error in your rsyncd.conf file and the rsync does'nt use them but no error or info is showed at all!

    And so, the format of rsyncd.secrets file, is:

    backup:
    

提交回复
热议问题