1

What am I doing

I am trying to Glacier-restore all objects under the kevinturino.com prefix in my s3 bucket named simplewebsite. I want the prefix kevinturino.com/plugins to be excluded.

What is happening?

The kevinturino.com/plugins prefix is not being excluded.

My command is:

s3cmd -d --force restore --recursive -D999 --exclude=*plugins* --exclude=plugins/ --exclude=*/plugins* --exclude=kevinturino.com/plugins/ --exclude=kevinturino.com/plugins/* s3://simplewebsite/kevinturino.com/

Debug shows:

DEBUG: Canonical Request:
GET
/
marker=kevinturino.com%2Fplugins%2Fnew%2Fsym%2Froot%2Fetc%2Falternatives%2Fri&prefix=kevinturino.com%2F
host:simplewebsite.s3.amazonaws.com
x-amz-content-sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
x-amz-date:20170925T030908Z

host;x-amz-content-sha256;x-amz-date
e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
----------------------
DEBUG: signature-v4 headers: {'x-amz-content-sha256': u'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855', 'Authorization': u'AWS4-HMAC-SHA256 Credential=obfuscated/20170925/us-east-1/s3/aws4_request,SignedHeaders=host;x-amz-content-sha256;x-amz-date,Signature=obfuscated', 'x-amz-date': '20170925T030908Z'}
DEBUG: Processing request, please wait...
DEBUG: get_hostname(simplewebsite): simplewebsite.s3.amazonaws.com
DEBUG: ConnMan.get(): re-using connection: https://simplewebsite.s3.amazonaws.com#6
DEBUG: format_uri(): /?marker=kevinturino.com%2Fplugins%2Fnew%2Fsym%2Froot%2Fetc%2Falternatives%2Fri&prefix=kevinturino.com%2F
DEBUG: Sending request method_string='GET', uri=u'/?marker=kevinturino.com%2Fplugins%2Fnew%2Fsym%2Froot%2Fetc%2Falternatives%2Fri&prefix=kevinturino.com%2F', headers={'x-amz-content-sha256': u'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855', 'Authorization': u'AWS4-HMAC-SHA256 Credential=obfuscated/20170925/us-east-1/s3/aws4_request,SignedHeaders=host;x-amz-content-sha256;x-amz-date,Signature=obfuscated', 'x-amz-date': '20170925T030908Z'}, body=(0 bytes)
DEBUG: Response:
{'headers': {'content-type': 'application/xml',
             'date': 'Mon, 25 Sep 2017 03:09:09 GMT',
             'server': 'AmazonS3',
             'transfer-encoding': 'chunked',
             'x-amz-bucket-region': 'us-east-1',
             'x-amz-id-2': 'obfuscated',
             'x-amz-request-id': '500238C860B78674'},
 'reason': 'OK',
 'status': 200}

What do I expect?

All objects to be processed for restoration, and the kevinturino.com/plugins prefix to be excluded.

Felipe Alvarez
  • 3,720
  • 2
  • 33
  • 42
  • Side-note: These days it is recommended to use the official [AWS Command-Line Interface (CLI)](http://aws.amazon.com/cli/) rather than `s3cmd`. – John Rotenstein Sep 25 '17 at 05:00
  • Aws cli has no easy way to restore all objects in a bucket from glacier and then change their storage class to STANDARD. – Felipe Alvarez Sep 26 '17 at 07:36

0 Answers0