Using FTP to Sync

Today, I discover a very exciting and useful tool, lftp. I was looking for a way to sync my client’s work on my development machine with client’s production machine. Even though the project is stored on SVN. I have no SSH access to the client production machine. The only access to the machine is FTP. After some searches, I found lftp. The thing I like about it, is that it is possible to script ftp to automate future synchronization. That is an excellent and important feature to have.

This is what I have in my lftp script file, lftp.script

open serverhost
user username password
lcd localdirectory
cd remotedirectory
mirror -R --only-newer

When I want to sync the directory, I just run the command “lftp -f lftp.script”. This will synchronize the two directory. Of course, this is the last option if client machine does not have SSH and/or SVN installed.

More information about lftp tool can be found here, http://lftp.yar.ru/

Share and Enjoy:
  • Print this article!
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • LinkedIn
  • NewsVine
  • Reddit
  • RSS
  • Slashdot
  • StumbleUpon
  • Technorati
  • Twitter
  • Yahoo! Bookmarks

You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>