FTP client with rsync-like functionality

I'm looking for an FTP client that runs on FreeBSD and has some of the functionality of rsync: making a directory tree on the remote side be an exact copy of a local directory tree. In the directory tree, there are hundreds of files (some pretty large), and typically only a few of them are changed / added / deleted. With rsync, I can achieve this easily by some judicious combination of -a, -u, -c and --delete. With the standard (base system) ftp, I only get commands dir, put and delete. So to update, I need to keep track of exactly which files have changed on my end.

The real underlying problem is that I have to (for historical reasons ...) use a certain web hosting company, and their web directory can only be accessed / updated by ftp. No, I can't log in and use git or mercurial for the ftp directory; I can't run rsync on their end, it is really ONLY accessible by ftp.

I was thinking that a hyper-smart ftp client could implement that. Is there such a thing?

Failing that, I could write some sort of hack. Like a python program that uses ftp and checks file mtime and names and puts / deletes as necessary. Or I could have two copies of the local directory tree, use rsync to update the second copy from the first, and use the log messages of rsync to construct a list of ftp commands. Both ideas are more work and less reliable than just finding a good tool.
 
FileZilla ?

I'm not sure if has rsync like the description, but I used FileZilla for years Windows, Linux, and FreeBSD, and it can copy to/from while ignoring same-size files if they exist, and has speed limits!

I used it with vsftpd FTP server.
 
I'll try ftpsync and FileZilla, sometime this weekend.

EDIT 1: ftpsync can't do the job off the bat. Here's why: My "source" directory is full of symlinks, which get dereferenced (expanded) when copying to the remote ftp server. Rsync knows how to do that with the "-L" (capital L) switch; ftpsync has no equivalent switch (its -l lower case L switch has a different function). Tomorrow I'll try working around that by first expanding all symlinks locally into a temporary copy, then using ftpsync on the temporary.

Wasn't there a FUSE filesystem on top of ftp?
Found it: The port is called curlftpfs. I'm scared to try it, it's such a crazy idea. But then, these days people turn nearly anything into a fuse filesystem.
 
Found it: The port is called curlftpfs. I'm scared to try it, it's such a crazy idea. But then, these days people turn nearly anything into a fuse filesystem.

Obviously mmap would be problematic. But IIRC GNU rsync doesn't use mmap anywhere in the file syncing.

And you get the -c rsync option to verify files. Still crazy but not obviously undoable.
 
ftpsync did the job, after I first used a local rsync to expand (dereference) all soft links. Then I used ftpsync to compare local and remote directories, and found them to be perfectly in sync. The initial rsync only takes a minute, so not much overhead.

In retrospect, that would probably have been the perfect tool, since it has a "mirror" command with a "dereference all soft links" option, just like rsync.
 
Back
Top