Fix for batch mode (was Re: batch mode maintainability)

Jos Backus josb at cncdsl.com
Sat Jan 26 19:02:31 EST 2002


On Wed, Jan 23, 2002 at 11:05:15AM -0600, Dave Dykstra wrote:
> One time I accidentally tried use --read-batch to directory that didn't
> match the destination directory that was present when --write-batch created
> the files, and then it core dumped at batch.c line 487:

I don't see a coredump in this situation; read-batch works without problems
here with a different directory (see one of my previous posts).

However, when I add ``-z'',  rsync does fail when using a different target
directory. Is this what you are seeing?

lizzy:~/src/rsync/batch-test% sh -x x
+ PATH=../rsync:/home/jos/bitkeeper:/usr/local/Office51/bin:/usr/local/java/bin:/var/qmail/bin:/home/jos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin
+ prefix=foo
+ s=s d1=d1 d2=d2
+ rm -rf d1
+ rm -rf d2
+ rm -f foo.rsync_argvs foo.rsync_csums foo.rsync_delta foo.rsync_flist
+ ls -l
total 2
drwxr-xr-x  2 jos  staff  512 Jan 17 15:08 s
-rwxr-xr-x  1 jos  staff  340 Jan 25 23:57 x
+ mkdir d1
+ mkdir d2
+ ls -l s
total 2
-rw-r--r--  1 jos  staff  6 Jan 17 15:08 f1
-rw-r--r--  1 jos  staff  6 Jan 17 15:08 f2
+ rsync -avz --write-batch=foo s/ d1/
rsync: building file list...
rsync: 3 files to consider.
./
f1, len 6
f2, len 6
wrote 172 bytes  read 52 bytes  149.33 bytes/sec
total size is 12  speedup is 0.05
+ rsync -avz --read-batch=foo d1/
wrote 12 bytes  read 20 bytes  64.00 bytes/sec
total size is 0  speedup is 0.00
+ rsync -avz --read-batch=foo d2/
./
f1, len 6
rsync error: received SIGUSR1 or SIGINT (code 20) at rsync.c(229)
+ ls -l
total 8
drwxr-xr-x  2 jos  staff  512 Jan 17 15:08 d1
drwxr-xr-x  2 jos  staff  512 Jan 25 23:57 d2
-rwx------  1 jos  staff   39 Jan 25 23:57 foo.rsync_argvs
-rw-------  1 jos  staff   16 Jan 25 23:57 foo.rsync_csums
-rw-------  1 jos  staff   62 Jan 25 23:57 foo.rsync_delta
-rw-------  1 jos  staff  218 Jan 25 23:57 foo.rsync_flist
drwxr-xr-x  2 jos  staff  512 Jan 17 15:08 s
-rwxr-xr-x  1 jos  staff  340 Jan 25 23:57 x
+ ls -l d1
total 2
-rw-r--r--  1 jos  staff  6 Jan 17 15:08 f1
-rw-r--r--  1 jos  staff  6 Jan 17 15:08 f2
+ ls -l d2
total 1
-rw-r--r--  1 jos  staff  6 Jan 17 15:08 f1


-- 
Jos Backus                 _/  _/_/_/        Santa Clara, CA
                          _/  _/   _/
                         _/  _/_/_/             
                    _/  _/  _/    _/
josb at cncdsl.com     _/_/   _/_/_/            use Std::Disclaimer;




More information about the rsync mailing list