Archive for May, 2010

Recursive Upload with cURL

May 26th, 2010 by James Sullivan | No Comments | Filed in Uncategorized

I found myself trying to migrate files from a client’s server to a rackspace cloud sites account.  Unfortunately, the server that was the source did not have lftp, ncftp, or any other ftp client I could use to recursively upload files.  I wrote a script in php then realized that php-cli didn’t have ftp compiled.

Here is the line that I used to upload the data to the rackspace cloud site using a find statement and curl:

find -type f -exec curl -v -u myusername:mypassword –ftp-create-dirs -T {} ftp://ftp3.ftptoyoursite.com/www.mynewwebsite.com/web/content/{} \;

  • Author

    Here you can provide some author or blog infomation.