Backing up Object Store: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
No edit summary
Line 7: Line 7:
===Give us permission===  
===Give us permission===  


You need to configure the iam policy statement of *all the buckets* you want to back up so your TSM robot user in charge of the backup can access them. Here is the policy that needs to be added.
You need to configure the iam policy statement of '''all the buckets''' you want to back up so your TSM robot user in charge of the backup can access them. Here is the policy that needs to be added.


For example, using the [https://docs.aws.amazon.com/cli/latest/ aws cli] and apply the policy on <code>my-bucket</code> using the <code>my-profile</code> identity.  
For example, using the [https://docs.aws.amazon.com/cli/latest/ aws cli] and apply the policy on <code>my-bucket</code> using the <code>my-profile</code> identity.  
Line 20: Line 20:
If that command returns something, you need to add the new statement the existing policy. But we are not covering that here.
If that command returns something, you need to add the new statement the existing policy. But we are not covering that here.


Adding policy.json to `my-bucket`
Adding policy.json to </code>my-bucket</code>
<div class="filename">'''File :''' policy.json </div>
<div class="filename">'''File :''' policy.json </div>
<syntaxhighlight lang=json file=my-policy.json>
<syntaxhighlight lang=json file=my-policy.json>
Line 46: Line 46:
$aws s3api --profile my-profile  put-bucket-policy --policy file://my-policy.json --bucket my-bucket
$aws s3api --profile my-profile  put-bucket-policy --policy file://my-policy.json --bucket my-bucket
</pre>
</pre>
==Restore procedure==
Send a list of buckets or object to restore to juno@calculquebec.ca. You will be asked to create a bucket for each bucket you want to restore to retore with the <code>-restore</code> prefix.
<div class="filename">'''File :''' policy.json </div>
<syntaxhighlight lang=json file=my-policy.json>
{
"Statement": [
  {
    "Effect": "Allow",
    "Principal": {"AWS": ["arn:aws:iam:::user/tsm"]},
    "Action": [
      "s3:ListBucket",
      "s3:PutObject"
    ],
    "Resource": [
      "arn:aws:s3:::my-bucket-restore/*",
      "arn:aws:s3:::my-bycket-restore"
    ]
  }
]
}
</syntaxhighlight>
102

edits

Navigation menu