samba-bugs@samba.org
2005-Apr-26 02:01 UTC
[Bug 2647] --exclude options work from commandline but not in script
https://bugzilla.samba.org/show_bug.cgi?id=2647 ------- Additional Comments From vanes002@umn.edu 2005-04-25 18:50 ------- A possible explanation is if the single-quotes are being retained in the --exclude values instead of being removed by whatever shell you are using for scripting. So rsync tries to exclude '/proc/' instead of /proc/ In your case, the quotes aren't even needed since you don't have wildcards, shell metachars, or whitespace in those path values. Remove the single-quotes and see if that helps. If it does, then either your shell has a problem or they weren't really single-quotes to begin with. -- Configure bugmail: https://bugzilla.samba.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug, or are watching the QA contact.
samba-bugs@samba.org
2005-Apr-26 13:41 UTC
[Bug 2647] --exclude options work from commandline but not in script
https://bugzilla.samba.org/show_bug.cgi?id=2647 ------- Additional Comments From jason@jasonpfeil.com 2005-04-26 06:27 ------- That is an interesting suggestion and one I dismissed out of hand. However, it is possible and I will evaluate that possibility. Thank you. I have removed the single quotes from surrounding the exclude values and testing that. FYI, here is the shell that I am using: # bash --version GNU bash, version 2.05b.0(1)-release (i686-pc-linux-gnu) Copyright (C) 2002 Free Software Foundation, Inc. -- Configure bugmail: https://bugzilla.samba.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug, or are watching the QA contact.
samba-bugs@samba.org
2005-Apr-26 20:02 UTC
[Bug 2647] --exclude options work from commandline but not in script
https://bugzilla.samba.org/show_bug.cgi?id=2647 ------- Additional Comments From jason@jasonpfeil.com 2005-04-26 12:55 ------- Hrm. Well, that suggestion didn't appear to work. The command that was run now was: /usr/bin/rsync -v --progress --delete --stats --exclude=/proc/ --exclude=/sys/ --exclude=/mnt/sysbackup/ -aS / . It still synced the directories that it shouldn't. I am going to strace it and see if I can figure out what is going on... -- Configure bugmail: https://bugzilla.samba.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug, or are watching the QA contact.
samba-bugs@samba.org
2005-Apr-27 09:01 UTC
[Bug 2647] --exclude options work from commandline but not in script
https://bugzilla.samba.org/show_bug.cgi?id=2647 wayned@samba.org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |WORKSFORME ------- Additional Comments From wayned@samba.org 2005-04-27 01:55 ------- Rsync doesn't care about being run from inside a script or not. Depending on how the script was run, there can be differences in environment variables, but nothing in the command you mentioned should be affected by that (AFAICS). You should be looking for something in the script that is not quite what you think it is -- some subtle difference between the command you ran manually and the actual command in the script (such as a different source dir, a misspelled exclude, etc.). If you can't find what's wrong, feel free to attach the script to this bug report. -- Configure bugmail: https://bugzilla.samba.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug, or are watching the QA contact.
samba-bugs@samba.org
2005-May-17 06:41 UTC
[Bug 2647] --exclude options work from commandline but not in script
https://bugzilla.samba.org/show_bug.cgi?id=2647 ------- Additional Comments From dmitri.zoubkov@t-online.de 2005-05-16 23:31 ------- This isn't rsync issue but a strange manner how bash escapes the <'>. ### Script 1 (won't work): EXLUDES="--exclude='/whatever/'" rsync -avuz "$EXLUDES" /source /destination ### Script 2 (won't either): RSYNC="rsync -avuz --exclude='/whatever/' /source /destination" $RSYNC ### Script 3 (works as expected): VAL="'/whatever/'" EXLUDES="--exclude=$VAL" rsync -avuz "$EXLUDES" /source /destination -- Configure bugmail: https://bugzilla.samba.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug, or are watching the QA contact.
samba-bugs@samba.org
2005-May-17 07:21 UTC
[Bug 2647] --exclude options work from commandline but not in script
https://bugzilla.samba.org/show_bug.cgi?id=2647 ------- Additional Comments From wayned@samba.org 2005-05-17 00:11 -------> ### Script 3 (works as expected)If by "works as expected" you mean that it excludes a file whose name is a single apostrophe whose grandparent directory also has a name of a single apostrophe. (That's certainly what I expect it to do, and what it actually does too.) Maybe you meant to write this VAL assignment? VAL='/whatever/' Keep in mind that shell-special characters are not re-parsed when expanding variables (which would be very bad) unless you use eval. It may also help to note that writing --exclude='foo' is exactly the same as writing '--exclude=foo' (it's just that the former seems more natural to most people), so there's no need for all the extra quotes in what you're trying to do -- just quote the values when assigning them to a variable and they'll be fine. -- Configure bugmail: https://bugzilla.samba.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug, or are watching the QA contact.