2
我正在使用帶有'--files-from'的rsync,並且我想排除這個列表中的其中一個被過濾器「保護」但它似乎不起作用。rsync --files-from和保護過濾器不起作用
這是我的設置:/backuplist.txt文件
內容:
path1
path2/and/more
rsync命令是這樣的:
rsync -aHr --filter "protect path1/*" $dry --progress --delete --force --inplace --delete-after --files-from=/backuplist.txt /source /target
我要的是遞歸複製文件從'/ source/path1'和'/ source/path2/and/more'到'/ target/path1'和'/ target/path2/and/more'。一切都在現有的目標路徑的源路徑不存在應除「/目標/路徑1」中的任何文件被刪除的下面
我嘗試以下過濾器不工作(!):
--filter "protect path1/*"
--filter "protect path1/"
--filter "protect path1"
--filter "protect /path1"
歡迎任何幫助!
我發現名稱'/ target/source/path1'令人困惑。這是它的來源還是目標? –
抱歉的錯字。當然是/ target/path1。 –