Is there a good command I can run from the Terminal that will one-way sync a directory with an FTP directory in a smart way?

I'd like it to for example delete all files on the FTP that no longer exist locally and to only upload files that are new or changed.

Any clues?

Note: Have tried to ask this before and was told rsync works with SFTP, which is good, but I have to work with a server that only supports FTP

link|improve this question

68% accept rate
feedback

1 Answer

You can mount an FTP host through fuse, much like sshfs.

curlftpfs -o allow_other ftp://myusername:mypassword@ftp.mydomain.com myftp

Once mounted, you can run rsync against it.

link|improve this answer
1  
Note that rsync might try to calculate the checksum of each file, which will effectively download everything from the mounted ftp directory. Look at the manpage, probably you will want --size-only. – Denilson Sá Jul 16 '10 at 19:59
This doesn't seem to exist in 10.4 at least, but I can try this out once I have a Mac I can install MacPorts on. – Svish Sep 2 '10 at 8:42
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.