diff options
| author | intrigeri <intrigeri@boum.org> | 2011-10-22 21:46:50 +0200 | 
|---|---|---|
| committer | intrigeri <intrigeri@boum.org> | 2011-10-22 21:46:50 +0200 | 
| commit | f351306d82a5a98f1827643deefc7ed69ce98716 (patch) | |
| tree | a3e2887ede9c562f4e5f346e9e6c40ea9cfa1110 | |
| parent | 25ad989fb72a53556421bd6e56c2275be9eadcab (diff) | |
| download | backupninja-f351306d82a5a98f1827643deefc7ed69ce98716.tar.gz backupninja-f351306d82a5a98f1827643deefc7ed69ce98716.tar.bz2  | |
dup: add support for RackSpace's CloudFiles.
Thanks to Yuval Kogman <nothingmuch@woobling.org> for the patch.
| -rw-r--r-- | AUTHORS | 1 | ||||
| -rw-r--r-- | ChangeLog | 2 | ||||
| -rw-r--r-- | examples/example.dup | 10 | ||||
| -rw-r--r-- | handlers/dup.helper.in | 10 | ||||
| -rw-r--r-- | handlers/dup.in | 16 | 
5 files changed, 39 insertions, 0 deletions
@@ -41,3 +41,4 @@ Sergio Talens-Oliag <sto@debian.org> -- pipefail fixes  Bruno Bigras <bigras.bruno@gmail.com> -- enable tar handler in the build system  aihtdikh -- Allow 'when = XXX' with spaces in .sh files.  Chris Lamb <lamby@debian.org> -- rdiff.helper bugfix +Yuval Kogman <nothingmuch@woobling.org> -- RackSpace's CloudFiles support for duplicity @@ -3,6 +3,8 @@ version 1.0 -- UNRELEASED  	dup:  	 . Make the .dup generated by ninjahelper more consistent with  	   example.dup. +	 . Add support for RackSpace's CloudFiles. +	   Thanks to Yuval Kogman <nothingmuch@woobling.org> for the patch.  version 0.9.10 -- September 23, 2011      backupninja changes diff --git a/examples/example.dup b/examples/example.dup index 5e6b424..77bda83 100644 --- a/examples/example.dup +++ b/examples/example.dup @@ -194,6 +194,16 @@ exclude = /var/cache/backupninja/duplicity  # awsaccesskeyid =   # awssecretaccesskey =  +## RackSpace's CloudFiles username, API key, and authentication URL. +## cfusername = YOUR_CF_USERNAME +## cfapikey = YOUR_CF_API_KEY +## cfauthurl = YOUR_CF_AUTH_URL +## +## Default: +# cfusername =  +# cfapikey =  +# cfauthurl =  +  ## FTP password, needed for backups using desturl = ftp://...  ##  ## Default: diff --git a/handlers/dup.helper.in b/handlers/dup.helper.in index 050cbca..ba2850f 100644 --- a/handlers/dup.helper.in +++ b/handlers/dup.helper.in @@ -454,6 +454,16 @@ keepincroffulls = $dup_keepincroffulls  #awsaccesskeyid = YOUR_AWS_ACCESS_KEY_ID  #awssecretaccesskey = YOUR_AWS_SECRET_KEY +## RackSpace's CloudFiles username, API key, and authentication URL. +## cfusername = YOUR_CF_USERNAME +## cfapikey = YOUR_CF_API_KEY +## cfauthurl = YOUR_CF_AUTH_URL +## +## Default: +# cfusername =  +# cfapikey =  +# cfauthurl =  +  # FTP password, needed for backups using desturl = ftp://...  #ftp_password =  diff --git a/handlers/dup.in b/handlers/dup.in index 40f6723..a3684c8 100644 --- a/handlers/dup.in +++ b/handlers/dup.in @@ -30,6 +30,9 @@ getconf keepincroffulls all  getconf desturl  getconf awsaccesskeyid  getconf awssecretaccesskey +getconf cfusername +getconf cfapikey +getconf cfauthurl  getconf ftp_password  getconf sshoptions  getconf bandwidthlimit 0 @@ -46,6 +49,9 @@ destdir=${destdir%/}  if [ "`echo $desturl | @AWK@ -F ':' '{print $1}'`" == "s3+http" ]; then     [ -n "$awsaccesskeyid" -a -n "$awssecretaccesskey" ]  || fatal "AWS access keys must be set for S3 backups."  fi +if [ "`echo $desturl | @AWK@ -F ':' '{print $1}'`" == "cf+http" ]; then +   [ -n "$cfusername" -a -n "$cfapikey" ]  || fatal "Cloudfiles access keys must be set for S3 backups." +fi  if [ "`echo $desturl | @AWK@ -F ':' '{print $1}'`" == "ftp" ]; then     [ -n "$ftp_password" ]  || fatal "ftp_password must be set for FTP backups."  fi @@ -232,6 +238,16 @@ if [ "`echo $desturl | @AWK@ -F ':' '{print $1}'`" == "s3+http" ]; then     export AWS_SECRET_ACCESS_KEY="$awssecretaccesskey"  fi +### If desturl is a RackSpace's CloudFiles URL export the relevant +### environment variables +if [ "`echo $desturl | @AWK@ -F ':' '{print $1}'`" == "cf+http" ]; then +   export CLOUDFILES_USERNAME="$cfusername" +   export CLOUDFILES_APIKEY="$cfapikey" +   if [ -n "$cfauthurl" ]; then +      export CLOUDFILES_AUTHURL="$cfauthurl" +   fi +fi +  ### Cleanup commands (duplicity >= 0.4.4)  # cleanup  | 
