List Info

Thread: ftp upload synchronization tool




ftp upload synchronization tool
user name
2007-04-09 10:38:55
Hello all. I may need to copy pkgsrc on this, but I figure I
will start here.

I need a tool which will synchronize a local directory on a
NetBSD
machine to a directory on an ftp server, and I only have
regular ftp
access on the remote machine.

I would prefer:

o That it only uploads new or changed files
o That it can do it non-interactively
o That it exists in pkgsrc
o That it can recreate the directory structure from the
local NetBSD
machine to the ftp server

I haven't found anything that would work easily. The built
in ftp
client can't create directories, or I would use it (using an
input
file in a loop).

I found something called wput, but it's not building on my
NetBSD/cobalt 3.1 machine, and it's not in pkgsrc so I'd
rather not
use it. I suppose if I could get it working, adding it to
pkgsrc might
be a good idea, but I'd rather start with something that
already
works.

Any ideas would be appreciated.

Andy

Re: ftp upload synchronization tool
country flaguser name
Canada
2007-04-09 10:54:48
On 2007.04.09 08:38:55 -0700, Andy Ruhl wrote:
> I need a tool which will synchronize a local directory
on a NetBSD
> machine to a directory on an ftp server, and I only
have regular ftp
> access on the remote machine.

I've used www/sitecopy with great success.

Brian.

-- 
  Brian de Alwis | Software Practices Lab | UBC | http://www.cs.ubc.ca/~bsd/

      "Amusement to an observing mind is study." -
Benjamin Disraeli

Re: ftp upload synchronization tool
user name
2007-04-09 12:11:49
On 4/9/07, Brian de Alwis <bsdcs.ubc.ca> wrote:
> I've used www/sitecopy with great success.

That appears to be the tool I need. I'm running it right
now.

Thanks.

Andy

Re: ftp upload synchronization tool
country flaguser name
United States
2007-04-09 12:16:49
> I need a tool which will synchronize a local directory
on a NetBSD
> machine to a directory on an ftp server, and I only
have regular ftp
> access on the remote machine.

Have a look at pkgsrc/net/mirror and pkgsrc/net/lftp

  Jeremy C. Reed

Re: ftp upload synchronization tool
country flaguser name
United Kingdom
2007-04-10 10:15:50
> But it can?  
> 
> $ man ftp | col -b | sed -ne '/  mkdir/,/remote/p'
>      mkdir directory-name
>                  Make a directory on the remote
machine.

Using .netrc files, you could do something like (/bin/sh
syntax):

  REM=remote.machine1.com
  cat > .netrc.$REM << EOC
  machine $REM
  login anonymous
  password memy.host.org
  macdef init
  cd upload-dir
  mkdir new-dir
  put new-file1
  put new-file2
  quit

  EOC
  ftp -N .netrc.$REM $REM

and watch the results.  If you want to parse the results,
you can look at
the NNN codes returned by the ftp server.  If you want to
act on the results
of each command, you probably should look at something like
lang/tcl-expect
in pkgsrc.

J

-- 
  My other computer also runs NetBSD    /        Sailing at
Newbiggin
        http://www.netbsd.org/    
   /   http://www.newbi
gginsailingclub.org/

[1-5]

about | contact  Other archives ( Real Estate discussion Medical topics )