Home

sitecopy with ssh/scp, sftp

Japanese
Here are some patches for  sitecopy about ssh/scp, sftp.

sitecopy is a file mirroring tool, especially for web contents. It supports FTP and WebDAV protocols.

It is simmilar to weex, ftpmirror, mirror , etc. Comparing these tools, sitecopy has a particular feature that it records locally the status of files in server side, in order to list up files which need update without connecting the server. Handling protocol in sitecopy's source code is so abstracted, that it makes easy to add a new one.

programs upload / download store status locally process lock protocols written in
FTP WebDAV rsh/rcp ssh/scp sftp
sitecopy OK OK NG OK OK partially partially this patch! C
weex OK ?? ?? OK NG NG NG NG C
ftpmirror ?? ?? ?? OK NG NG NG NG Perl5
mirror OK ?? ?? OK NG NG NG NG Perl
rsync OK NG ?? NG NG OK OK NG C

Although not documented, sitecopy partially supports rsh/rcp. The following configuration, for example, is a way to use ssh/scp.

~/.sitecopyrc

site hogehoge
   server hogehoge
   protocol rsh
#   username nob   # if needed
   rsh "ssh"       # optional
   rcp "scp -p"    # optional
   remote /home/nob/dst
   local /home/nob/src
   permissions all


For more convenience, it needs some patches like below. Here are what I posted in sitecopy ML.

simple patchcomplex patch
sitecopy-0.10.15.ftp-decode-permis.patch sitecopy-0.10.15.rsh-null.patch sitecopy-0.10.15.ftp-decode-permis.patch sitecopy-0.10.15.rsh.patch
String terminating '\0' is lost in a certain case. support --fetch option (no good implementation)

The following is the updated patch of the above. Simple patch has been already taken into the original sitecopy.

complex patch
sitecopy-0.11.4.rsh.patch
support --fetch option (no good implementation)

sftp support

May 6, 2002
TEST: This patch enable support for sftp partially. It can't handle errors yet. It conflicts with sitecopy-0.11.4.rsh.patch. Testing on openssh-3.1p1.

TODO:
support sftp protocol (TESTING)
sitecopy-0.11.4.sftp-1.patch.gz

May 7, 2002
Use fork() instead of popen("sftp ...","w"), but can't handle errors yet.

support sftp protocol (TESTING)
sitecopy-0.11.4.sftp-2.patch.gz

Jul 19, 2002
Enabled fetch list. It's not better to use "state checksum".

support sftp protocol (TESTING)
sitecopy-0.11.4.sftp-3.patch.gz

Oct 28, 2002
Enabled rename list.

support sftp protocol (TESTING)
sitecopy-0.11.4.sftp-4.patch.gz

May 30, 2003
Updated to sitecopy-0.13.0. Thanks to contributed patch by Gordon Haverland. Attention, other patch is needed.

support sftp protocol (TESTING)
sitecopy-0.13.0.sftp-4.patch.gz

Jun 16, 2003
sitecopy-0.13.1.sftp-4.patch.gz

Jul 1, 2003
sitecopy-0.13.3.sftp-4.patch.gz (Also appliable for sitecopy-0.13.4.)


Oct 21, 2004
sitecopy-0.14.2-sftp1.patch.gz
Since my patch is partially adopted by upstream, my work is not completed and it seems to take long time. This is half done work.

Oct 26, 2004
sitecopy-0.14.2-sftp2.patch.gz


Home
Feel free to link to us.
Nobuyuki Tsuchimura(tutimura(a)nn.iij4u.or.jp) Replace '(a)' with '@'
modified on 1/28 18:41, 2005