Dear all, I have enhanced scp to do the following. 1) Check the SHA1 checksums of the file fragments at the source and destination and resume file transfer from where it left off last time 2) If the file checksums match and size also matches, then the file is assumed to be identical and skipped, the user is also informed of the same 3) If the destination file size is larger than the source, it is overwritten(conforms to prev behavior, the enhancement here being that checksum computation is short circuited) 4) If the checksums do not match for the fragment, then the file is overwritten 5) All the above works well in recursive mode also, the identical files are skipped, broken transfers resumed and all other times files are transferred like before 6) One important feature of this enhancement is that if the same file is not found at the destination , then the previous wire protocol is preserved, thus there would be no version mismatch problem for fresh transfers. However these changes do necessitate a bump in the version number IMHO. I could not think of any other way to solve this problem. I will only be too glad to make whatever changes are necessary to apply this patch to HEAD. Hope you like this work. :-) regards, Girish
Sorry folks, there was a nasty merge issue and hence my previous patch was broken. Please bear with me for the oversight. Here is the correct patch. regards, Girish On 5/10/06, Girish Venkatachalam <girish1729 at gmail.com> wrote:> Dear all, > > I have enhanced scp to do the following. > > 1) Check the SHA1 checksums of the file fragments at the source and > destination and resume file transfer from where it left off last time > > 2) If the file checksums match and size also matches, then the file is > assumed to be identical and skipped, the user is also informed of the > same > > 3) If the destination file size is larger than the source, it is > overwritten(conforms to prev behavior, the enhancement here being that > checksum computation is short circuited) > > 4) If the checksums do not match for the fragment, then the file is overwritten > > 5) All the above works well in recursive mode also, the identical > files are skipped, broken transfers resumed and all other times files > are transferred like before > > 6) One important feature of this enhancement is that if the same file > is not found at the destination , then the previous wire protocol is > preserved, thus there would be no version mismatch problem for fresh > transfers. > > > However these changes do necessitate a bump in the version number > IMHO. I could not think of any other way to solve this problem. > > I will only be too glad to make whatever changes are necessary to > apply this patch to HEAD. > > Hope you like this work. :-) > > regards, > Girish > > >-- Whenever people agree with me I feel I am wrong. -- Oscar Wilde
Circa 2006-05-10 03:10 dixit Girish Venkatachalam: : Dear all, : : I have enhanced scp to do the following. [do pretty much the same thing as rsync] What's wrong with using rsync? It already does pretty much the same thing, with no bump in version number necessary. http://rsync.samba.org/ -- jim knoble | jmknoble at pobox.com | http://www.pobox.com/~jmknoble/ (GnuPG key ID: 6F39C2CC >>>>>> http://www.pobox.com/~jmknoble/keys/ ) (GnuPG fingerprint: 5024:D578:7CF4:5660:7269::F6F3:B919:9307:6F39:C2CC) ________________________________________________________________________ |"[L]iberty, as we all know, cannot flourish in a country that is perma- | nently on a war footing, or even a near-war footing." --Aldous Huxley |_______________________________________________________________________