~mterry/duplicity/2.6isms

« back to all changes in this revision

Viewing changes to duplicity/backends/botobackend.py

  • Committer: Kenneth Loafman
  • Date: 2014-02-26 19:58:06 UTC
  • mfrom: (919.5.15 duplicity)
  • Revision ID: kenneth@loafman.com-20140226195806-cc9k8f94ag9wb4ul
* Merged in lp:~prateek/duplicity/s3-glacier
  - Fixes https://bugs.launchpad.net/duplicity/+bug/1039511
    - Adds support to detect when a file is on Glacier and initiates a restore
      to S3. Also merges overlapping code in the boto backends
  - Fixes https://bugs.launchpad.net/duplicity/+bug/1243246
    - Adds a --s3_multipart_max_timeout input option to limit the max execution
      time of a chunked upload to S3. Also adds debug message to calculate
      upload speed.

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
# along with duplicity; if not, write to the Free Software Foundation,
21
21
# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22
22
 
 
23
import duplicity.backend
23
24
from duplicity import globals
24
25
import sys
 
26
from _boto_multi import BotoBackend as BotoMultiUploadBackend
 
27
from _boto_single import BotoBackend as BotoSingleUploadBackend
25
28
 
26
29
if globals.s3_use_multiprocessing:
27
 
    if sys.version_info[:2] < (2,6):
28
 
        print "Sorry, S3 multiprocessing requires version 2.5 or later of python"
 
30
    if sys.version_info[:2] < (2, 6):
 
31
        print "Sorry, S3 multiprocessing requires version 2.6 or later of python"
29
32
        sys.exit(1)
30
 
    import _boto_multi
 
33
    duplicity.backend.register_backend("gs", BotoMultiUploadBackend)
 
34
    duplicity.backend.register_backend("s3", BotoMultiUploadBackend)
 
35
    duplicity.backend.register_backend("s3+http", BotoMultiUploadBackend)
31
36
else:
32
 
    import _boto_single
 
37
    duplicity.backend.register_backend("gs", BotoSingleUploadBackend)
 
38
    duplicity.backend.register_backend("s3", BotoSingleUploadBackend)
 
39
    duplicity.backend.register_backend("s3+http", BotoSingleUploadBackend)