a***@qdqmedia.com
2015-11-16 15:03:53 UTC
Hello!
I have my own object storage cluster with Riak-CS and I would like to
synchronize it with Amazon S3 with backups purpose.
I have made a testing environment with two object storage servers (also
with RIAK-CS), and I'm trying to synchronize two buckets with the same
name, but I'm not able to make the synchronization process works, it
returns a 404 error.
I'm using boto 2.38.
here is the code I'm using:
from boto.s3.key import Key
from boto.s3.connection import S3Connection
from boto.s3.connection import OrdinaryCallingFormat
apikey04='GFR3O0HFPXQ-BWSXEMAG'
secretkey04='eIiigR4Rov2O2kxuSHNW7WPoJE2KmrtMpzzqlg=='
apikey02='J0TT_C9MJPWPGHW-KEWY'
secretkey02='xcLOt3ANqyNJ0kAjP8Mxx68qr7kgyXG3eqJuMA=='
cf=OrdinaryCallingFormat()
conn04=S3Connection(aws_access_key_id=apikey04,aws_secret_access_key=secretkey04,
is_secure=False,host='rk04.ejemplo.com
',port=8080,calling_format=cf)
conn02=S3Connection(aws_access_key_id=apikey02,aws_secret_access_key=secretkey02,
is_secure=False,host='rk02.ejemplo.com
',port=8080,calling_format=cf)
bucket04=conn04.get_bucket('testbucket')
bucket02=conn02.get_bucket('testbucket')
rs04 = bucket04.list()
for k in rs04:
print k.name
bucket02.copy_key(k.key, bucket04, k.key)
When this script is executed it returns:
Traceback (most recent call last):
File "s3_connect_2.py", line 38, in <module>
bucket02.copy_key(k.key, bucket04, k.key)
File
"/home/alberto/.virtualenvs/boto/local/lib/python2.7/site-packages/boto/s3/bucket.py",
line 888, in copy_key
response.reason, body)
boto.exception.S3ResponseError: S3ResponseError: 404 Not Found
<?xml version="1.0"
encoding="UTF-8"?><Error><Code>NoSuchKey</Code><Message>The specified key
does not exist.</Message><Resource>/<Bucket: testbucket>$
Has anyone does something similar before?
Tanks a lot.
I have my own object storage cluster with Riak-CS and I would like to
synchronize it with Amazon S3 with backups purpose.
I have made a testing environment with two object storage servers (also
with RIAK-CS), and I'm trying to synchronize two buckets with the same
name, but I'm not able to make the synchronization process works, it
returns a 404 error.
I'm using boto 2.38.
here is the code I'm using:
from boto.s3.key import Key
from boto.s3.connection import S3Connection
from boto.s3.connection import OrdinaryCallingFormat
apikey04='GFR3O0HFPXQ-BWSXEMAG'
secretkey04='eIiigR4Rov2O2kxuSHNW7WPoJE2KmrtMpzzqlg=='
apikey02='J0TT_C9MJPWPGHW-KEWY'
secretkey02='xcLOt3ANqyNJ0kAjP8Mxx68qr7kgyXG3eqJuMA=='
cf=OrdinaryCallingFormat()
conn04=S3Connection(aws_access_key_id=apikey04,aws_secret_access_key=secretkey04,
is_secure=False,host='rk04.ejemplo.com
',port=8080,calling_format=cf)
conn02=S3Connection(aws_access_key_id=apikey02,aws_secret_access_key=secretkey02,
is_secure=False,host='rk02.ejemplo.com
',port=8080,calling_format=cf)
bucket04=conn04.get_bucket('testbucket')
bucket02=conn02.get_bucket('testbucket')
rs04 = bucket04.list()
for k in rs04:
print k.name
bucket02.copy_key(k.key, bucket04, k.key)
When this script is executed it returns:
Traceback (most recent call last):
File "s3_connect_2.py", line 38, in <module>
bucket02.copy_key(k.key, bucket04, k.key)
File
"/home/alberto/.virtualenvs/boto/local/lib/python2.7/site-packages/boto/s3/bucket.py",
line 888, in copy_key
response.reason, body)
boto.exception.S3ResponseError: S3ResponseError: 404 Not Found
<?xml version="1.0"
encoding="UTF-8"?><Error><Code>NoSuchKey</Code><Message>The specified key
does not exist.</Message><Resource>/<Bucket: testbucket>$
Has anyone does something similar before?
Tanks a lot.
--
You received this message because you are subscribed to the Google Groups "boto-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to boto-users+***@googlegroups.com.
To post to this group, send email to boto-***@googlegroups.com.
Visit this group at http://groups.google.com/group/boto-users.
For more options, visit https://groups.google.com/d/optout.
You received this message because you are subscribed to the Google Groups "boto-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to boto-users+***@googlegroups.com.
To post to this group, send email to boto-***@googlegroups.com.
Visit this group at http://groups.google.com/group/boto-users.
For more options, visit https://groups.google.com/d/optout.