Uploading nightmare

Petr Baudis pasky at ucw.cz
Thu Mar 6 07:43:05 EST 2003


  Hello,

  I've been trying to upload (that is local source, remote destination) one
file of size about 15MiB, using

$ rsync -Pcav ./rx.gz pasky.ji.cz::foo

  The problem is that it started uploading the file, but it didn't create it
directly on the other side, but instead created some temporary file
(.rx.gz.J4r4qe). I didn't quite like that and looked for an option which would
turn this off, but didn't find out anything (it would be useful to have such an
_option_, so that you have the file available when it's still being uploaded
yet). I interrupted the running rsync so that I could test if it can't be
accomplished in any way, but I was unsuccessful.

  As I used --preserve (part of -P), the temporary file was still there (but
not renamed to the final file name) (I want to use --preserve since it would be
stupid to lost the whole file if the upload had to be interrupted for some
reason), it had about 128KiB. Ok, I shrugged, so I will resume the upload.  But
now it completely ignored that temporary file and created another one. Since it
wasn't that much, I let it be and went away. When I returned and checked the
upload, it was done already, but when looking at the result, the 128KiB large
temporary file was sitting there under the name rx.gz (and the temporary files
were gone, of course). That is, not only that rsync didn't rename the temporary
file to rx.gz when the upload was interrupted and ignored its existence when
restarting the upload, but it eventually renamed the wrong temporary file and
removed the correct one! I've finally re-uploaded the file again, with only one
temporary file hanging around, thus the result was correct already, but such
nasty things like this should probably not happen.

  I still hope that I missed something and I'm not using the right set of
parameters etc, but I didn't find out any documentation regarding temporary
files and similiar problems. I'm using rsync-2.5.5 on Linux at the both sides;
upgrade to 2.5.6 is not that easy there and having look at the changes list,
nothing seems related to my problem.

  Kind regards,

-- 
 
				Petr "Pasky" Baudis
.
When in doubt, use brute force.
		-- Ken Thompson
.
Crap: http://pasky.ji.cz/


More information about the rsync mailing list