samba-bugs@samba.org
2005-Apr-25 21:00 UTC
[Bug 2647] New: --exclude options work from commandline but not in script
https://bugzilla.samba.org/show_bug.cgi?id=2647 Summary: --exclude options work from commandline but not in script Product: rsync Version: 2.6.4 Platform: x86 OS/Version: Linux Status: NEW Severity: major Priority: P3 Component: core AssignedTo: wayned@samba.org ReportedBy: jason@jasonpfeil.com QAContact: rsync-qa@samba.org Greetings! Thank you for such a wonderful tool in rsync. I am trying to use rsync to back up one filesystem tree to another on the same disk. The catch is that the destination tree is mounted under the source tree. To prevent the backup from getting a copy of itself, I have tried to use the --exclude option, but to no avail. The general procedure for my script is to cd to the destinateion directory (in this case: /mnt/backup) and rsync the source directory (in this case: /) to the destination directory. Here's the command that gets run: /usr/bin/rsync -v --progress --delete --stats --exclude='/proc/' --exclude='/sys/' --exclude='/mnt/sysbackup/' -aS / . I want to exclude the /sys, /proc, and /mnt/sysbackup directories and *everything* underneath them from being backed up to the /mnt/sysbackup directory. The kicker is that if I run that command manually like so: ( cd /mnt/sysbackup; /usr/bin/rsync -v --progress --delete --stats --exclude='/proc/' --exclude='/sys/' --exclude='/mnt/sysbackup/' -aS / . ) it works fine. When the exact same rsync command is run from within the script (following the cd /mnt/sysbackup command), I get a /mnt/sysbackup/mnt/sysbackup directory with *everything* under the /mnt/sysbackup directory duplicated. I also get /mnt/sysbackup/sys and /mnt/sysbackup/proc directories complete with data in them. Cheers! -- 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.
Apparently Analagous Threads
- [Bug 2647] --exclude options work from commandline but not in script
- [Bug 2561] New: rsync crashes when using the "exclude from" option on server side.
- weird characters in files created by gnome login on samba share
- [LLVMdev] CommandLine handling of -help and -version options
- [LLVMdev] Extra command line options from the LLVM CommandLine parser