rsync does not --exclude: (??)
lars+lister.freebsd at adventuras.no
Sat Oct 28 02:11:11 UTC 2006
Gary Kline skrev:
> Weeks ago I tried this *without* the --exclude flags and
> overwrote DOT file that I didn't want to. Iust rechecked this
> use of rsync, saving important files from my work server
> elseswhere, and see that some files or directories are being
> listed and copied over. IDoes anything obvious jump out here?
> ## test2ethos.sh
> rsync -Cptuvaz -n -e "ssh -i /home/kline/.ssh/tao_XXXYYYZZZ-id" \
> --exclude /home/kline/.zlogin \
> --exclude /home/kline/.zshrc \
> --exclude /home/kline/.zhistory.* \
> --exclude /home/kline/.ctwrm \
> --exclude /home/kline/.mozilla \
> --exclude /home/kline/.evolution \
> --exclude /home/kline/4zip/ \
> --exclude '/home/kline/www/' \
> /home/kline kline at ethos:/home/kline
Hope this might help.
From man rsync:
"global include/exclude patterns are anchored at the "root of the transfer"
in man rsync look for: "INCLUDE/EXCLUDE PATTERN RULES"
and "ANCHORING INCLUDE/EXCLUDE PATTERNS"
> if [ $? = 0 ]
> echo "rsync transfer went okay: tao to ethos"
> echo "rsync failed to ethos from /home/kline"|mail kline at thought.org
More information about the freebsd-questions