Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

share|improve this question
add comment

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.

share|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
    
@Svish: brew install curlftpfs worked for me. –  Joel Purra Jul 14 '12 at 20:15
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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