
我有一個硬碟驅動器,我使用 rsync 備份到網路連接儲存。目標(nas)上有一些非空目錄在來源上不再存在。這不是權限問題。
我在作業系統上遇到了安裝問題。
--delete 選項確實有效。 --force 選項(不含 --delete)不會報告任何更多的目錄刪除(--progress 選項)。
rsync -raz --progress --delete --ignore-errors --exclude-from='exclude_list.txt' {source} {destination}
答案1
試試這個命令
rsync -ravzX --delete <source> <destination>
答案2
我有同樣的情況,但只是同步掌握和奴隸:
rsync -rpogt --delete ${origin} ${destination}