Linux

Windows 到 Linux(rsync 和 ssh)

  • May 20, 2015

我正在嘗試將 Windows 圖片中的文件夾備份到遠端 Linux 目錄。

這就是我所擁有的:

rsync -av ssh /cygdrive/c/users/Owner/Pictures/ blah@192.168.1.10:/var/files/ImageSync/

我從以下網址獲得了這種格式:https ://stackoverflow.com/questions/4182286/transferring-from-windows-to-linux-with-rsync

但我收到此錯誤:

rsync: link_stat "/home/Owner/ssh" failed: No such file or directory (2) rsync: change_dir "/cygdrive/c/users/Owner/Pictures" failed: No such file or directory (2) sent 20 bytes received 12 bytes 64.00 bytes/sec total size is 0 speedup is 0.00 rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1165) [sender=3.1.1]

ssh已經連結了一個密鑰對,所以不需要密碼。除非我做錯了什麼,這就是我遇到問題的原因。

我也試過:

rsync -av -e ssh /cygdrive/c/users/Owner/Pictures/ blah@192.168.1.10:/var/files/ImageSync/

並得到同樣的錯誤

我必須在聲明-av -e開關之前傳遞源文件夾:

$ rsync /cygdrive/c/users/Owner/Pictures/ -av -e ssh blah@192.168.1.10:/var/files/ImageSync/

引用自:https://unix.stackexchange.com/questions/204602