Hi.
I'm trying to accomplish the following ;
1) First, I did a rsync for a file, like this
/usr/bin/rsync -lptgoD --delete --rsh=/usr/bin/ssh -R --delete-excluded
-vv root@127.0.0.1:/usr/local/src/* /tmp/localhost/daily.0
If I did a ls -la to the destination dir
(/tmp/localhost/daily.0/usr/local/src/README) I take
ls -la /tmp/localhost/daily.0/usr/local/src/
total 60
drwxrwsr-x 2 root staff 4096 Jan 9 00:43 .
drwxrwsr-x 3 root staff 4096 Jan 6 23:31 ..
-rw-r--r-- 5 root staff 10377 Jan 9 00:43 README
Later, when I make the following rsync
/usr/bin/rsync -lptgoD --delete --rsh=/usr/bin/ssh -R --delete-excluded
-vv --exclude=/usr/local/src/README* root@127.0.0.1:/usr/local/src/*
/tmp/localhost/daily.0
I see that the README file stills exists.
If I make the same process for a direcory, for example
/usr/local/src/temp/ , it works fine, rsync delete the
/usr/local/src/temp directory, and all it's contents.
I see that the problem appears when I have a file on the target.
Here a verbose output (-vvvvv)
cmolina:/home/cmolina/projects/pdbs# /usr/bin/rsync -lptgoD --delete
--rsh=/usr/bin/ssh -R --delete-excluded -vvvvv
--exclude=/usr/local/src/README root@127.0.0.1:/usr/local/src/*
/tmp/localhost/daily.0
add_exclude(/usr/local/src/README,exclude)
cmd=/usr/bin/ssh machine=127.0.0.1 user=root path=/usr/local/src/*
cmd=/usr/bin/ssh -l root 127.0.0.1 rsync --server --sender -vvvvvlogDtpR
--delete-excluded . /usr/local/src/*
opening connection using /usr/bin/ssh -l root 127.0.0.1 rsync --server
--sender -vvvvvlogDtpR --delete-excluded . "/usr/local/src/*"
root@127.0.0.1's password:
add_exclude(/usr/local/src/README,exclude)
server_sender starting pid=11625
make_file(1,/usr)
expand file_list to 4000 bytes, did move
recv_file_name(/usr)
make_file(1,/usr/local)
recv_file_name(/usr/local)
make_file(1,/usr/local/src)
recv_file_name(/usr/local/src)
excluding file /usr/local/src/README because of pattern
/usr/local/src/README
skipping directory /usr/local/src/rsback-0.4.2
make_file(1,/usr/local/src/rsback-0.4.2.tar.gz)
recv_file_name(/usr/local/src/rsback-0.4.2.tar.gz)
received 4 names
[11621] i=0 <NULL> usr mode=040755 len=4096
[11621] i=1 usr local mode=042775 len=4096
[11621] i=2 usr/local src mode=042775 len=4096
[11621] i=3 usr/local/src rsback-0.4.2.tar.gz mode=0100600 len=39192
[11625] i=0 usr mode=040755 len=4096
[11625] i=1 /usr local mode=042775 len=4096
[11625] i=2 /usr/local src mode=042775 len=4096
[11625] i=3 /usr/local/src rsback-0.4.2.tar.gz mode=0100600 len=39192
recv_file_list done
get_local_name count=4 /tmp/localhost/daily.0
recv_files(4) starting
send_file_list done
send_files starting
generator starting pid=11621 count=4
recv_generator(usr,0)
recv_generator(usr/local,1)
recv_generator(usr/local/src,2)
recv_generator(usr/local/src/rsback-0.4.2.tar.gz,3)
usr/local/src/rsback-0.4.2.tar.gz is uptodate
generate_files phase=1
recv_files phase=1
send_files phase=1
generate_files phase=2
send files finished
total: matches=0 tag_hits=0 false_alarms=0 data=0
recv_generator(usr,0)
recv_generator(usr/local,1)
recv_generator(usr/local/src,2)
recv_files finished
wrote 41 bytes read 895 bytes 267.43 bytes/sec
total size is 39192 speedup is 41.87
client_run2 waiting on 11622
_exit_cleanup(code=0, file=main.c, line=925): entered
_exit_cleanup(code=0, file=main.c, line=925): about to call exit(0)
cmolina:/home/cmolina/projects/pdbs# ls -la
/tmp/localhost/daily.0/usr/local/src/
total 60
drwxrwsr-x 2 root staff 4096 Jan 9 00:43 .
drwxrwsr-x 3 root staff 4096 Jan 6 23:31 ..
-rw-r--r-- 5 root staff 10377 Jan 9 00:43 README
-rw------- 1 root staff 39192 Nov 27 21:56 rsback-0.4.2.tar.gz
Thanks in advance.
Carlos