## Description - Remove bucket creationn from the quickstart - Remove repo connect from the quickstart - Add examples to the repo page - Reoder setup pages given pre-requisites to the examples on the repo page - Cleanups, edits, and clarifications on the repo page ## Type of change <!--- Please check the type of change your PR introduces: ---> - [x] 🌻 Feature - [x] 🐛 Bugfix - [x] 🗺️ Documentation ## Issue(s) <!-- Can reference multiple issues. Use one of the following "magic words" - "closes, fixes" to auto-close the Github issue. --> * Closes #1262
136 lines
3.9 KiB
Markdown
136 lines
3.9 KiB
Markdown
---
|
|
description: "Configure backup repository"
|
|
---
|
|
|
|
# Repositories
|
|
|
|
import Tabs from '@theme/Tabs';
|
|
import TabItem from '@theme/TabItem';
|
|
|
|
A Corso [repository](concepts#corso-concepts) stores encrypted copies of your backup data. Repositories are
|
|
supported on the following object storage systems:
|
|
|
|
import TOCInline from '@theme/TOCInline';
|
|
|
|
<TOCInline toc={toc} maxHeadingLevel={2}/><br/>
|
|
|
|
:::note
|
|
Depending on community interest, Corso will add support for other object storage backends in the future.
|
|
:::
|
|
|
|
## Amazon S3
|
|
|
|
### Prerequisites
|
|
|
|
Before setting up your Corso S3 repository, the following prerequisites must be met:
|
|
|
|
* The S3 bucket for the repository already exists. Corso won't create it for you.
|
|
* You have access to credentials for a user or an IAM role that has the following permissions:
|
|
|
|
```json
|
|
{
|
|
"Version": "2012-10-17",
|
|
"Statement": [
|
|
{
|
|
"Effect": "Allow",
|
|
"Action": [
|
|
"s3:PutObject",
|
|
"s3:GetObject",
|
|
"s3:ListBucket",
|
|
"s3:DeleteObject",
|
|
"s3:GetBucketLocation",
|
|
],
|
|
"Resource": [
|
|
"arn:aws:s3:::<YOUR_BUCKET_NAME>",
|
|
"arn:aws:s3:::<YOUR_BUCKET_NAME>/*"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
```
|
|
|
|
### Credential setup {#s3-creds-setup}
|
|
|
|
Corso supports the credential options offered by the AWS Go SDK. For Full details, see the *Specifying Credentials*
|
|
section of the [official documentation](https://docs.aws.amazon.com/sdk-for-go/v1/developer-guide/configuring-sdk.html).
|
|
The two most commonly-used options are:
|
|
|
|
* **Environment variables** - set and export `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY`. If using temporary
|
|
credentials derived by assuming an IAM Role, you will also need `AWS_SESSION_TOKEN`.
|
|
|
|
* **Credentials file** - ensure that the credentials file is available to Corso (for example, may need to map it if
|
|
using Corso as a container). You may also want to set and export `AWS_PROFILE`, if not using the default profile, and
|
|
`AWS_SHARED_CREDENTIALS_FILE`, if not using the default file location. You can learn more about the AWS CLI
|
|
environment variables [here](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-envvars.html).
|
|
|
|
### Initialize repository
|
|
|
|
Before first use, you need to initialize a Corso repository with `corso repo init s3`. See the command details
|
|
[here](/cli/corso_repo_init_s3).
|
|
|
|
<Tabs groupId="os">
|
|
<TabItem value="win" label="Powershell">
|
|
|
|
```powershell
|
|
# Initialize the Corso Repository
|
|
$Env:CORSO_PASSPHRASE = "CHANGE-ME-THIS-IS-INSECURE"
|
|
.\corso.exe repo init s3 --bucket corso-test
|
|
```
|
|
|
|
</TabItem>
|
|
<TabItem value="unix" label="Linux/macOS">
|
|
|
|
```bash
|
|
# Initialize the Corso Repository
|
|
export CORSO_PASSPHRASE="CHANGE-ME-THIS-IS-INSECURE"
|
|
corso repo init s3 --bucket corso-test
|
|
```
|
|
|
|
</TabItem>
|
|
<TabItem value="docker" label="Docker">
|
|
|
|
```bash
|
|
# Initialize the Corso Repository
|
|
export CORSO_PASSPHRASE="CHANGE-ME-THIS-IS-INSECURE"
|
|
docker run --env-file $HOME/.corso/corso.env \
|
|
--volume $HOME/.corso:/app/corso ghcr.io/alcionai/corso:latest \
|
|
repo init s3 --bucket corso-test
|
|
```
|
|
|
|
</TabItem>
|
|
</Tabs>
|
|
|
|
### Connect to a repository
|
|
|
|
If a repository already exists, you can connect to it with `corso repo connect s3`. See the command details
|
|
[here](/cli/corso_repo_connect_s3).
|
|
|
|
<Tabs groupId="os">
|
|
<TabItem value="win" label="Powershell">
|
|
|
|
```powershell
|
|
# Connect to the Corso Repository
|
|
.\corso.exe repo connect s3 --bucket corso-test
|
|
```
|
|
|
|
</TabItem>
|
|
<TabItem value="unix" label="Linux/macOS">
|
|
|
|
```bash
|
|
# Connect to the Corso Repository
|
|
corso repo connect s3 --bucket corso-test
|
|
```
|
|
|
|
</TabItem>
|
|
<TabItem value="docker" label="Docker">
|
|
|
|
```bash
|
|
# Connect to the Corso Repository
|
|
docker run --env-file $HOME/.corso/corso.env \
|
|
--volume $HOME/.corso:/app/corso ghcr.io/alcionai/corso:latest \
|
|
repo connect s3 --bucket corso-test
|
|
```
|
|
|
|
</TabItem>
|
|
</Tabs>
|