Backing up Object Store: Difference between revisions

m
Restore procedure clean-up.
m (Restore procedure clean-up.)
 
Line 1: Line 1:
__FORCETOC__
__FORCETOC__


Object Store data, while stored redundantly via Ceph, is not backed up.  Object Store buckets are backed up to the TSM tape system upon request only by following the procedures listed on this page.
Object Store data, while stored redundantly via Ceph, is not backed up by default.  Object Store buckets are backed up to the TSM tape system upon request only by following the procedures listed on this page.


The following contents and policies apply to backups by default:
== Content and policies ==
The following are the default contents and policies of requested backups:


What is in the backup?
What is in the backup?
Line 20: Line 21:
==Email the list of buckets==
==Email the list of buckets==


Send a list of buckets to backup to [mailto:juno@calculquebec.ca sd4h support] with the name and ID of the project where the buckets live.
Send a list of buckets to be backed up to [mailto:juno@calculquebec.ca sd4h support] with the name and ID of the project where the buckets live.


==Give us permission==
==Give us permission==


An iam policy statement must be applied to '''all the buckets''' you want to backup so the TSM robot user in charge of the backup can access them.  This can be done with the [https://awscli.amazonaws.com/v2/documentation/api/latest/index.html aws cli].
An IAM policy statement must be applied to '''all the buckets''' you want to backup so the TSM robot user in charge of the backup can access them.  This can be done with the [https://awscli.amazonaws.com/v2/documentation/api/latest/index.html aws cli].


First, ensure that <code>my-bucket</code> currently has no policy.  Check bucket <code>my-bucket</code> using profile <code>my-profile</code> (as defined in ~/.aws/config and ~/.aws/credentials files):  
First, ensure that <code>my-bucket</code> currently has no IAM policy.  Check bucket <code>my-bucket</code> using profile <code>my-profile</code> (as defined in ~/.aws/config and ~/.aws/credentials files) with:  


<pre>$aws s3api get-bucket-policy --profile c3g-data-repos --bucket my-bucket
<pre>$aws s3api get-bucket-policy --profile c3g-data-repos --bucket my-bucket
Line 56: Line 57:
</syntaxhighlight>
</syntaxhighlight>


Load the policy onto the bucket <code>my-bucket</code> using the profile <code>my-profile</code>
Load the policy onto the bucket <code>my-bucket</code> using the profile <code>my-profile:</code>


<pre>
<pre>
Line 74: Line 75:
==Give us permission==
==Give us permission==


You will be asked to create a bucket for each bucket you want to restore to restore with the <code>-restore</code> suffix.  
For each bucket you want to be restored, you will be asked to create a bucket with the <code>-restore</code> suffix.
 
Following the previous procedure, apply this restore IAM policy.  
<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 91: Line 94:
     "Resource": [
     "Resource": [
       "arn:aws:s3:::my-bucket-restore/*",
       "arn:aws:s3:::my-bucket-restore/*",
       "arn:aws:s3:::my-bycket-restore"
       "arn:aws:s3:::my-bucket-restore"
     ]
     ]
   }
   }
Line 98: Line 101:
</syntaxhighlight>
</syntaxhighlight>


Once it is done we will restore you data to that folder.
Once done, we will restore your data to the <code>*-restore</code> buckets.
12

edits