Ftp – How to deploy new and changed files only via FTP

automationdeploymentftp

I'm working for a company who in some circumstances HAVE to deploy php web applications via FTP. I'm in the process of automating the deployment process and need to write a script to FTP the files to the staging and production environments.

Requirements:

  1. Should only transfer new or changed files to the remote server

Restrictions:

  1. No shell access of any kind on the remote environments
  2. Not able to use rsync
  3. Only FTP available

My question: Is there any FTP based utility I can employ that fulfils these requirements rather than write my own?

Best Answer

As long as you control the client, you could use FTPFS on the client, then rsync the local directory to the apparently-local-but-really-mounted-via FTPFS directory.

I understand that FTPFS is now part of LUFS.

Edit: I'd love to link to a tutorial, but I normally just start with the project wiki, and something seems to be up with sourceforge right now. CurlFTPFS, which seems to be based on cURL and FUSE, can be found here, and the mounting/unmounting there seems to be as simple as:

$ mkdir sunet
$ curlftpfs ftp://ftp.sunet.se/ sunet/
$ cd sunet/
$ ls -l
total 0
Dr-xr-xr-x   3 root root        96 Feb 23  2004 bin
dr-xr-xr-x   2 root root        72 Mar  2  2004 dev
dr-xr-xr-x   2 root root        48 Feb 23  2004 etc
dr-xr-xr-x   2 root root       120 Feb 23  2004 lib
-rw-r--r--   1 root root 622187310 Mar 11 06:13 ls-lR
-rw-r--r--   1 root root  76389037 Mar 11 06:15 ls-lR.gz
drwxrwxr-x  37 root root      1272 Feb 27 14:17 pub
dr-xr-xr-x   3 root root        72 Feb 23  2004 usr
$ cd ..
$ fusermount -u sunet/