开发者

rsync don't sync the sub folders?

开发者 https://www.devze.com 2023-03-12 01:31 出处:网络
rsync only syncs the files in my note folder, but not the sub fold开发者_如何学编程ers or the files in the sub folders. This is my command:

rsync only syncs the files in my note folder, but not the sub fold开发者_如何学编程ers or the files in the sub folders. This is my command:

rsync -a --progress --size-only --exclude=".DS_Store" --exclude=".swp" \
--exclude=".Trash"  --exclude="logs/*" --exclude="xmlogs/*" \
/Users/Devric/Documents/notes/ /Volumes/backup/

Anyone knows what's wrong with it?


I've just replicated your chosen flags and the sync went OK between my source and destination folders. Let's just refresh your memory:

-a stands for all which implies the following flags: -rlptgoD (recurse, copy symlinks, preserve permissions, preserve file times, preserve group, preserve owner, and preserve devices and special files, respectively)

Thus your needed recursion is already taken for, only problem I've noticed is your last exclude having an extra space, try:

rsync -a --progress --size-only --exclude=".DS_Store" --exclude=".swp" --exclude=".Trash"  --exclude="logs/*" --exclude="xmlogs/*" /Users/Devric/Documents/notes/ /Volumes/backup/

Also, if efficiency is a must for you, google for some --filter=+rs_/ uses

0

精彩评论

暂无评论...
验证码 换一张
取 消