1 |
On 11/19/10 00:08:06, Mick wrote: |
2 |
> On Wednesday 17 November 2010 12:16:48 Helmut Jarausch wrote: |
3 |
> > Hi, |
4 |
> > |
5 |
> > I have two problems with rsync |
6 |
> > |
7 |
> > 1st) if I give both commandline options -u and -c |
8 |
> > it looks as if a file which is more recent but different |
9 |
> > on the destination is not updated, i.e. -u overrules -c |
10 |
> > Is that true? |
11 |
> > |
12 |
> > 2nd) There is a symlink A on <SourceDir> which refers to a |
13 |
> directory |
14 |
> > On the other hand, A is the name of a (real) subdirectory of |
15 |
> > <DestDir> |
16 |
> > |
17 |
> > Now doing |
18 |
> > rsync -auHz --delete --exclude=/A <SourceDir>/ <DestDir>/ |
19 |
> > does remove A on <DestDir> - why ? |
20 |
> |
21 |
> I don't know the answer to your 1st question, but I think that the |
22 |
> answer to |
23 |
> your 2nd question is that A on the <DestDir> is removed because of |
24 |
> the |
25 |
> -- |
26 |
> delete option. According to the man page: |
27 |
> |
28 |
> --delete delete extraneous files from dest dirs. |
29 |
> |
30 |
|
31 |
Thanks Mick, but --exclude protects against deletion. My problem was |
32 |
that I did use |
33 |
rsync -auHz --delete --exclude=/A/ <SourceDir>/ <DestDir>/ |
34 |
.................................^ |
35 |
|
36 |
because A is a directory on <DestDir>. But it turned out that this |
37 |
does delete A on <DestDir> since A is a symlink on <SourceDir> and the |
38 |
include/exclude pattern is applied to the <SourceDir> only. |
39 |
|
40 |
Helmut. |
41 |
|
42 |
|
43 |
|
44 |
-- |
45 |
Helmut Jarausch |
46 |
Lehrstuhl fuer Numerische Mathematik |
47 |
RWTH - Aachen University |
48 |
D 52056 Aachen, Germany |