PLATFORM: AIX 4.3.3.25
RSYNC VERSION: 2.4.6
I am trying to use rsync to maintain a copy of a directory tree, but have
run into problems getting the --delete flag to work. As an experiment I
created two directories /tmp/tmpsrc and /tmp/tmpdest on the same machine.
/tmp/tmpsrc contains three files...
/tmp/tmpsrc/b
/tmp/tmpsrc/c
/tmp/tmpsrc/d -> c
/tmp/tmpdest contains four files....
/tmp/tmpdest/a
/tmp/tmpdest/b
/tmp/tmpdest/c
/tmp/tmpdest/d -> c
With /tmp as the current working directory, I issue the command....
rsync -rlptvvvv --delete tmpsrc/* tmpdest
...to synchronize the two directories. I expected the file /tmp/tmpdest/a
to be deleted but it wasn't. Am I misunderstanding the documentation? The
text from the
debug output is as follows....
cmd= machine= user= path=tmpdest
cmd=. tmpdest
local_version=24 remote_version=24
local_version=24 remote_version=24
building file list ... make_file(4,b)
make_file(4,c)
make_file(4,d)
done
[19908] i=0 <NULL> b mode=0100644 len=0
[19908] i=1 <NULL> c mode=0100644 len=0
[19908] i=2 <NULL> d mode=0120777 len=1
send_file_list done
file list sent
send_files starting
server_recv(2) starting pid=25340
recv_file_name(b)
recv_file_name(c)
recv_file_name(d)
received 3 names
[25340] i=0 <NULL> b mode=0100644 len=0
[25340] i=1 <NULL> c mode=0100644 len=0
[25340] i=2 <NULL> d mode=0120777 len=1
recv_file_list done
get_local_name count=3 tmpdest
generator starting pid=25340 count=3
recv_files(3) starting
recv_generator(b,0)
b is uptodate
recv_generator(c,1)
c is uptodate
recv_generator(d,2)
d is uptodate
generate_files phase=1
send_files phase=1
recv_files phase=1
generate_files phase=2
send files finished
total: matches=0 tag_hits=0 false_alarms=0 data=0
client_run waiting on 25340
recv_files finished
wrote 67 bytes read 20 bytes 174.00 bytes/sec
total size is 1 speedup is 0.01
...as near as I can tell, the delete_files() procedure IS being called, but
the
"for (j=0;j<flist->count;j++) { }
" loop is "shorting" at the...
"if (!S_ISDIR(flist->files[j]->mode) ||
!(flist->files[j]->flags & FLAG_DELETE)) continue;"
...test where S_ISDIR(flist->files[j]->mode) returns 0 so !S_ISDIR... is 1
=> continue.
Is this the expected behavior?
Regards,
Jim
IBM Austin, ZIP 9582, 11400 Burnet Road, Austin, TX 78758
email: [EMAIL PROTECTED]
VM: IBMUSM(JIMCZ)
Phone: 1-512-823-6110 [TL 793-6110]
FAX: 1-512-838-0735 [TL 678-0735]