© 2024 fjorge. All rights reserved.
Upload a directory to Rackspace Cloudfiles

I put a little piece of sample code together that uploads a directory to Cloudfiles. I plan on running this on my web servers to upload the backup script to a safe place. This will replace my current pull method, which works fine, but costs me plenty in slicehost bandwidth charges.
Obviously, you will want to include php-cloudfiles and set $username, $key, $container and $location as desired. Note: This currently doesn't do any recursive uploads. I'm sure that will come with time but it's not something I needed for this application; I am creating tarballs to upload.