491b0455991f4291802b6475cbf0b7b8d462c8ba

Author
Christopher Sam <chrissam@Christophers-MacBook-Pro.local>
Committer
Christopher Sam <chrissam@Christophers-MacBook-Pro.local>
Date

Message

Add storage class option for AWS S3 to specify storage class to be used

Diff

 1diff --git a/duplicity-backup.conf.example b/duplicity-backup.conf.example
 2index 30185115e53c37eb7fe4cf6bc4164ac8da74427a..b53636ea9cbc4c0c015c0e83b42fa01dfb1d8c72 100644
 3--- a/duplicity-backup.conf.example
 4+++ b/duplicity-backup.conf.example
 5@@ -138,6 +138,16 @@ DEST="s3+http://foobar-backup-bucket/backup-folder/"
 6 #
 7 #AWS_ACCESS_KEY_ID="foobar_aws_key_id"
 8 #AWS_SECRET_ACCESS_KEY="foobar_aws_access_key"
 9+
10+# ------------------------------------------------------------------------------
11+# SET STORAGE CLASS for AWS
12+# ------------------------------------------------------------------------------
13+# The defaulct storage class is STANDARD STORAGE. You can comment this option if 
14+# want to go with standard. The other storage options are --s3-use-ia and --s3-use-rrs.
15+# Note: --s3-use-ia option is supported only in duplicity version greater than 0.7.06 
16+
17+#STORAGECLASS="--s3-use-ia"
18+
19 #
20 # S3CMD INFORMATION
21 # Most people don't need this, but in some cases
22diff --git a/duplicity-backup.sh b/duplicity-backup.sh
23index d36ea7ee95907e366d51ef27bd7f46ba6b2d084c..32f3513129e9c29fe6184a17c483d777a1d02b46 100755
24--- a/duplicity-backup.sh
25+++ b/duplicity-backup.sh
26@@ -566,6 +566,7 @@ duplicity_backup()
27 {
28   {
29     eval ${ECHO} ${DUPLICITY} ${OPTION} ${VERBOSITY} ${STATIC_OPTIONS} \
30+    ${STORAGECLASS} \
31     ${ENCRYPT} \
32     ${EXCLUDE} \
33     ${INCLUDE} \