Re: Does sftp or scp gaurentee delivery?

From: Nico Kadel-Garcia (nkadel_at_comcast.net)
Date: 02/25/04


Date: Wed, 25 Feb 2004 09:27:53 -0500


"Michael Zawrotny" <zawrotny@jaguar.sb.fsu.edu> wrote in message
news:slrnc3k77j.pvr.zawrotny@jaguar.sb.fsu.edu...
> Nico Kadel-Garcia <nkadel@comcast.net> wrote:
> >
> > "Snoopy_" <snoopy_@excite.com> wrote in message
> > news:e71fbf62.0402190648.63132a44@posting.google.com...
> > > Does anyone know if scp or sftp ensures that a transfer is complete.
> > > With plain ftp, I am never gaurenteed that the file is trasnferred
> > > completely (such as with checksum information), does sftp or scp use
> > > checksum information or such to ensure that the file that is
> > > transfered is complete? Thanks.
> >
> > "Sort Of(tm)." If you get an exit code of 0, it was supposed to have
worked,
> > but you're right that it's not checksumming. You want to use
"rsync -a -e
> > ssh", which uses the rsync protocol to duplicate the files instead of
the
> > less powerful and sophistated scp or sftp file duplication methods, and
> > which also are really a protocol resting on top of the SSH protocol and
> > binaries.
>
> If you want to be "Really Sure (tm)", you also need to add the "-c"
> option to rsync. Then rsync will do a 128 bit MD4 digest before and
> after transfer to ensure that the file is unchanged. That adds a lot
> of CPU cycles and time for large transfers, so it may or may not be
> appropriate for your needs. To quote the man page, "This option can
> be quite slow."

Ohh, yes. Good point. It's particularly helpful if you have source files
that might be modified during the time of transfer, such as an active
website or CVS directory.