diff --git a/duplicity-backup.conf.example b/duplicity-backup.conf.example index 0d5fb37..cb09289 100644 --- a/duplicity-backup.conf.example +++ b/duplicity-backup.conf.example @@ -90,8 +90,12 @@ ROOT="/home" # for you). If you don't want to use Amazon S3, you can backup # to a file or any of duplicity's supported outputs. # -# NOTE: You do need to keep the "s3+http:///" format -# even though duplicity supports "s3:///". +# The s3+http scheme uses the default aws s3 hostname. +# Use s3://host/bucket/[backup-folder/] if you want to specify the host name. +# If using the s3://... scheme and you have s3cmd installed, be sure to change +# 's3.amazonaws.com' to the appropriate host in your .s3cfg file so that the +# remote file size check will work. +#DEST="s3://host/backup-bucket/backup-folder/" DEST="s3+http://backup-bucket/backup-folder/" # Other possible locations #DEST="ftp://user[:password]@other.host[:port]/some_dir" diff --git a/duplicity-backup.sh b/duplicity-backup.sh index 992e9bf..3fe3bbf 100755 --- a/duplicity-backup.sh +++ b/duplicity-backup.sh @@ -338,6 +338,11 @@ get_remote_file_size() "s3") if $S3CMD_AVAIL ; then TMPDEST=$(echo ${DEST} | cut -c 11-) + dest_scheme=$(echo ${DEST} | cut -f -1 -d :) + if [ "$dest_scheme" = "s3" ]; then + # Strip off the host name, too. + TMPDEST=`echo $TMPDEST | cut -f 2- -d /` + fi SIZE=`${S3CMD} du -H s3://${TMPDEST} | awk '{print $1}'` else SIZE="s3cmd not installed."