Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I would like to sync a local folder on my Mac to a remote ftp server. I only want to upload files changed since last sync. I would also like to download new and modified files from the server. Is there a way to do this form OSX shell?

share|improve this question

3 Answers 3

up vote 0 down vote accepted

If it has to be FTP then AASync looks promising. It's a GUI based application but also can be scheduled and run in background. Maybe this is as good as being called by a shell.

share|improve this answer

Do you have ssh access? If so you should look at rsync. It won't work over FTP however.

From the command line:

$ rsync -avz -e ssh /local/dir someuser@someserver.com:/remote/dir/

Keep your eye on the trailing slashes, they make a difference

share|improve this answer
    
no rsync - just ftp. thanks anyway –  Billy Moon Aug 6 '11 at 12:48

If you are looking for bi-directional sync, look at unison. It is basically a wrapper around rsync to add bi-directional support. Binaries are available at http://www.cis.upenn.edu/~bcpierce/unison/download.html One caveat to be aware of is you must run the same version on the client and server, so if you dont have the ability to install it on the remote site it is useless. In that case, rsync is probably installed on the remote site and you can probably run two rsync commands to move data each way. Just note that conflicts will get overwritten with rsync.

share|improve this answer
    
no rsync - just ftp. thanks anyway –  Billy Moon Aug 6 '11 at 12:48

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.