duplicity-team team mailing list archive
-
duplicity-team team
-
Mailing list archive
-
Message #04775
[Merge] lp:~excitablesnowball/duplicity/s3-onezone-ia into lp:duplicity
Excitable Snowball has proposed merging lp:~excitablesnowball/duplicity/s3-onezone-ia into lp:duplicity.
Requested reviews:
duplicity-team (duplicity-team)
For more details, see:
https://code.launchpad.net/~excitablesnowball/duplicity/s3-onezone-ia/+merge/348941
--
Your team duplicity-team is requested to review the proposed merge of lp:~excitablesnowball/duplicity/s3-onezone-ia into lp:duplicity.
=== modified file 'bin/duplicity.1'
--- bin/duplicity.1 2017-09-16 20:45:17 +0000
+++ bin/duplicity.1 2018-07-04 12:26:45 +0000
@@ -776,6 +776,12 @@
recovery.
.TP
+.BI "--s3-use-onezone-ia"
+Store volumes using One Zone - Infrequent Access when uploading to Amazon S3.
+This storage is similar to Standard - Infrequent Access, but only stores object
+data in one Availability Zone.
+
+.TP
.BI "--s3-use-multiprocessing"
Allow multipart volumne uploads to S3 through multiprocessing. This option
requires Python 2.6 and can be used to make uploads to S3 more efficient.
=== modified file 'duplicity/backends/_boto_single.py'
--- duplicity/backends/_boto_single.py 2017-12-24 12:24:27 +0000
+++ duplicity/backends/_boto_single.py 2018-07-04 12:26:45 +0000
@@ -221,6 +221,8 @@
storage_class = 'REDUCED_REDUNDANCY'
elif globals.s3_use_ia:
storage_class = 'STANDARD_IA'
+ elif globals.s3_use_onezone_ia:
+ storage_class = 'ONEZONE_IA'
else:
storage_class = 'STANDARD'
log.Info("Uploading %s/%s to %s Storage" % (self.straight_url, remote_filename, storage_class))
=== modified file 'duplicity/commandline.py'
--- duplicity/commandline.py 2017-12-13 22:43:36 +0000
+++ duplicity/commandline.py 2018-07-04 12:26:45 +0000
@@ -534,6 +534,9 @@
# Whether to use S3 Infrequent Access Storage
parser.add_option("--s3-use-ia", action="store_true")
+ # Whether to use S3 One Zone Infrequent Access Storage
+ parser.add_option("--s3-use-onezone-ia", action="store_true")
+
# Whether to use "new-style" subdomain addressing for S3 buckets. Such
# use is not backwards-compatible with upper-case buckets, or buckets
# that are otherwise not expressable in a valid hostname.
@@ -1111,8 +1114,8 @@
if globals.restore_dir:
command_line_error("restore option incompatible with %s backup"
% (action,))
- if globals.s3_use_rrs and globals.s3_use_ia:
- command_line_error("--s3-use-rrs and --s3-use-ia cannot be used together")
+ if sum([globals.s3_use_rrs, globals.s3_use_ia, globals.s3_use_onezone_ia]) >= 2:
+ command_line_error("only one of --s3-use-rrs, --s3-use-ia, and --s3-use-onezone-ia may be used")
def ProcessCommandLine(cmdline_list):
=== modified file 'duplicity/globals.py'
--- duplicity/globals.py 2017-11-29 21:29:46 +0000
+++ duplicity/globals.py 2018-07-04 12:26:45 +0000
@@ -197,6 +197,9 @@
# Whether to use S3 Infrequent Access Storage
s3_use_ia = False
+# Whether to use S3 One Zone Infrequent Access Storage
+s3_use_onezone_ia = False
+
# True if we should use boto multiprocessing version
s3_use_multiprocessing = False
Follow ups