Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.os.linux.misc > #8515
| From | Rikishi42 <skunkworks@rikishi42.net> |
|---|---|
| Newsgroups | uk.comp.os.linux, comp.os.linux.misc |
| Subject | Re: rsync: exclude all, then include only specified, wildcard problems.. |
| Date | 2013-06-20 00:49 +0200 |
| Organization | A noiseless patient Spider |
| Message-ID | <c5p99a-c71.ln1@murmur.very.softly> (permalink) |
| References | <kpsi1n$37d$1@dont-email.me> |
Cross-posted to 2 groups.
On 2013-06-19, David <david@55952163-3189045.bogus.domain.invalid> wrote:
> I've been struggling with rsync (and its helpfully voluminous, but somewhat
> confusing, man page) all day.. :-(
>
> I am trying to write a shell script to use rsync to sync certain files to
> another location on the same computer. (The files are checked out from a
> subversion repository into the source location and need to be transferred
> to their final location, and have ownership and permission changes.)
>
> Just in case something has inadvertently found its way into the source
> location that shouldn't have (eg, a file that was checked in in the wrong
> place or some other human error), I want to essentially first of all
> exclude everything in the source folder from being synced, and then
> explicitly allow only the folder hierarchies that are supposed to be
> synced.
>
> I'm having problems trying to work out what my exclude rule should be [1],
> and I think my problems are further compounded by trying to assemble my
> command in a shell script and having wildcards (*) misinterpreted
> somewhere, but I'm not sure what I need to do to ensure that they are
> interpreted when they need to be, and passed through unscathed when not!
>
> (I get different results when I run my script, versus running the command
> that is assembled in it, directly at the command line!)
>
>
> [1] The more I re-read rsync's definitions of / and * in various places and
> quantities, the more confused I get.. ;-( ]
>
>
> My script is included below. Any help in trying to diagnose what's wrong
> with it gratefully received! (And if you want to pick it apart for
> inelegance too, feel free..)
>
> I've been juggling /s and *s all day and make no claims that what is in
> the script below make any sense, that's just where they are at present!
Not entirely certain, but you miht want to look into the --file-from option,
to define what has to be included rather then what has to be excluded.
No time to look into your case in details, hope it helps anyway.
--
When in doubt, use brute force.
-- Ken Thompson
Back to comp.os.linux.misc | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
rsync: exclude all, then include only specified, wildcard problems.. David <david@55952163-3189045.bogus.domain.invalid> - 2013-06-19 15:17 +0000
Re: rsync: exclude all, then include only specified, wildcard problems.. Rikishi42 <skunkworks@rikishi42.net> - 2013-06-20 00:49 +0200
Re: rsync: exclude all, then include only specified, wildcard problems.. David <david@55952163-3189045.bogus.domain.invalid> - 2013-06-25 11:50 +0000
Re: rsync: exclude all, then include only specified, wildcard problems.. Rikishi42 <skunkworks@rikishi42.net> - 2013-06-26 01:59 +0200
Re: rsync: exclude all, then include only specified, wildcard problems.. Richard Kettlewell <rjk@greenend.org.uk> - 2013-06-20 10:16 +0100
Re: rsync: exclude all, then include only specified, wildcard problems.. The Natural Philosopher <tnp@invalid.invalid> - 2013-06-20 14:19 +0100
Re: rsync: exclude all, then include only specified, wildcard problems.. David <david@55952163-3189045.bogus.domain.invalid> - 2013-06-25 11:17 +0000
Re: rsync: exclude all, then include only specified, wildcard problems.. Chris Davies <chris-usenet@roaima.co.uk> - 2013-06-20 10:57 +0100
Re: rsync: exclude all, then include only specified, wildcard problems.. David <david@55952163-3189045.bogus.domain.invalid> - 2013-06-25 11:40 +0000
Re: rsync: exclude all, then include only specified, wildcard problems.. Chris Davies <chris-usenet@roaima.co.uk> - 2013-06-25 21:00 +0100
Re: rsync: exclude all, then include only specified, wildcard problems.. dave.gma+news002@googlemail.com.invalid (Dave Gibson) - 2013-06-20 18:37 +0100
Re: rsync: exclude all, then include only specified, wildcard problems.. David <david@55952163-3189045.bogus.domain.invalid> - 2013-06-25 14:00 +0000
Re: rsync: exclude all, then include only specified, wildcard problems.. Richard Kettlewell <rjk@greenend.org.uk> - 2013-06-25 15:24 +0100
Re: rsync: exclude all, then include only specified, wildcard problems.. dave.gma+news002@googlemail.com.invalid (Dave Gibson) - 2013-06-25 19:23 +0100
Re: rsync: exclude all, then include only specified, wildcard problems.. Chick Tower <c.tower@deadspam.com> - 2013-06-20 18:04 +0000
Re: rsync: exclude all, then include only specified, wildcard problems.. dave.gma+news002@googlemail.com.invalid (Dave Gibson) - 2013-06-25 23:37 +0100
Re: rsync: exclude all, then include only specified, wildcard problems.. dave.gma+news002@googlemail.com.invalid (Dave Gibson) - 2013-06-26 01:54 +0100
Re: rsync: exclude all, then include only specified, wildcard problems.. David <david@55952163-3189045.bogus.domain.invalid> - 2013-06-28 16:12 +0000
Re: rsync: exclude all, then include only specified, wildcard problems.. dave.gma+news002@googlemail.com.invalid (Dave Gibson) - 2013-06-29 01:30 +0100
Re: rsync: exclude all, then include only specified, wildcard problems.. Chris Davies <chris-usenet@roaima.co.uk> - 2013-07-01 09:51 +0100
csiph-web