Clean up the quickstart page (#1254)

- Consistency across commands
- Consistency across subsection titles
- Reduce number of tabs
- Clarifications in the text
- Add tabs to creating your first backup

Co-authored-by: Georgi Matev <gmatev@alcion.ai>
This commit is contained in:
Niraj Tolia 2022-10-20 13:50:44 -07:00 committed by GitHub
parent 7221d616ac
commit 8906fbea17
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 71 additions and 45 deletions

View File

@ -46,8 +46,11 @@ Corso.
## Repository creation ## Repository creation
To create a secure backup location for Corso, we will create a bucket (`corso-test` is used as an example) in AWS S3. To create a secure backup location for Corso, you will create a bucket in AWS S3 and then initialize the Corso
The following commands assume that all configuration values from the previous step, `AWS_ACCESS_KEY_ID`, and repository using an [encryption passphrase](/setup/configuration#environment-variables). The steps below use
`corso-test` as the bucket name but, if you are using AWS, you will need a different unique name for the bucket.
The following commands assume that all the configuration values from the previous step, `AWS_ACCESS_KEY_ID`, and
`AWS_SECRET_ACCESS_KEY` are available to the Corso binary or container. `AWS_SECRET_ACCESS_KEY` are available to the Corso binary or container.
<Tabs groupId="os"> <Tabs groupId="os">
@ -56,32 +59,7 @@ The following commands assume that all configuration values from the previous st
```powershell ```powershell
# Create the AWS S3 Bucket # Create the AWS S3 Bucket
aws s3api create-bucket --bucket corso-test aws s3api create-bucket --bucket corso-test
```
</TabItem>
<TabItem value="unix" label="Linux/macOS">
```bash
# Create the AWS S3 Bucket
aws s3api create-bucket --bucket corso-test
```
</TabItem>
<TabItem value="docker" label="Docker">
```bash
# Create the AWS S3 Bucket
aws s3api create-bucket --bucket corso-test
```
</TabItem>
</Tabs>
Next, let's initialize the Corso repository using an encryption passphrase.
<Tabs groupId="os">
<TabItem value="win" label="Powershell">
```powershell
# Initialize the Corso Repository # Initialize the Corso Repository
$Env:CORSO_PASSPHRASE = "CHANGE-ME-THIS-IS-INSECURE" $Env:CORSO_PASSPHRASE = "CHANGE-ME-THIS-IS-INSECURE"
.\corso.exe repo init s3 --bucket corso-test .\corso.exe repo init s3 --bucket corso-test
@ -91,6 +69,9 @@ Next, let's initialize the Corso repository using an encryption passphrase.
<TabItem value="unix" label="Linux/macOS"> <TabItem value="unix" label="Linux/macOS">
```bash ```bash
# Create the AWS S3 Bucket
aws s3api create-bucket --bucket corso-test
# Initialize the Corso Repository # Initialize the Corso Repository
export CORSO_PASSPHRASE="CHANGE-ME-THIS-IS-INSECURE" export CORSO_PASSPHRASE="CHANGE-ME-THIS-IS-INSECURE"
corso repo init s3 --bucket corso-test corso repo init s3 --bucket corso-test
@ -100,37 +81,81 @@ Next, let's initialize the Corso repository using an encryption passphrase.
<TabItem value="docker" label="Docker"> <TabItem value="docker" label="Docker">
```bash ```bash
# Create the AWS S3 Bucket
aws s3api create-bucket --bucket corso-test
# Create an environment variables file
mkdir -p $HOME/.corso
cat <<EOF > $HOME/.corso/corso.env
CORSO_PASSPHRASE
AZURE_TENANT_ID
AZURE_CLIENT_ID
AZURE_CLIENT_SECRET
AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY
AWS_SESSION_TOKEN
EOF
# Initialize the Corso Repository # Initialize the Corso Repository
export CORSO_PASSPHRASE="CHANGE-ME-THIS-IS-INSECURE" export CORSO_PASSPHRASE="CHANGE-ME-THIS-IS-INSECURE"
docker run --env-file ~/.corso/corso.env \ docker run --env-file $HOME/.corso/corso.env \
--volume $HOME/.corso:/app/corso corso/corso:latest \ --volume $HOME/.corso:/app/corso ghcr.io/alcionai/corso:latest \
repo init s3 --bucket corso-test repo init s3 --bucket corso-test
``` ```
</TabItem> </TabItem>
</Tabs> </Tabs>
## Your first backup ## Creating your first backup
Corso can do much more, but you can start by creating a backup of your Exchange mailbox. Corso can do much more, but you can start by creating a backup of your Exchange mailbox. To do this, first ensure that
you are connected with the repository and then backup your own Exchange mailbox.
To do this, you can run the following command: <Tabs groupId="os">
<TabItem value="win" label="Powershell">
```bash ```powershell
$ docker run -e CORSO_PASSPHRASE \ # Connect to the Corso Repository
--env-file ~/.corso/corso.env \ .\corso.exe repo connect s3 --bucket corso-test
-v ~/.corso:/app/corso corso/corso:<release tag> \
# Backup your inbox
.\corso.exe backup create exchange --user <your exchange email address>
```
</TabItem>
<TabItem value="unix" label="Linux/macOS">
```bash
# Connect to the Corso Repository
corso repo connect s3 --bucket corso-test
# Backup your inbox
corso backup create exchange --user <your exchange email address>
```
</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
# Backup your inbox
docker run --env-file $HOME/.corso/corso.env \
--volume $HOME/.corso:/app/corso ghcr.io/alcionai/corso:latest \
backup create exchange --user <your exchange email address> backup create exchange --user <your exchange email address>
```
Started At ID Status Selectors </TabItem>
2022-10-10T19:46:43Z 41e93db7-650d-44ce-b721-ae2e8071c728 Completed (0 errors) alice@example.com </Tabs>
```
:::note :::note
Your first backup may take some time if your mailbox is large. Your first backup may take some time if your mailbox is large.
::: :::
## Restore an email ## Restoring an email
Now lets explore how you can restore data from one of your backups. Now lets explore how you can restore data from one of your backups.

View File

@ -48,7 +48,8 @@ To create the environment variables file, you can run the following command:
```bash ```bash
# Create an environment variables file # Create an environment variables file
cat <<EOF > ~/.corso/corso.env mkdir -p $HOME/.corso
cat <<EOF > $HOME/.corso/corso.env
CORSO_PASSPHRASE CORSO_PASSPHRASE
AZURE_TENANT_ID AZURE_TENANT_ID
AZURE_CLIENT_ID AZURE_CLIENT_ID
@ -73,7 +74,7 @@ The location of the configuration file can be specified using the `--config-file
</TabItem> </TabItem>
<TabItem value="unix" label="Linux/macOS"> <TabItem value="unix" label="Linux/macOS">
By default, Corso store its configuration file (`.corso.toml`) in the root of the home directory. By default, Corso stores its configuration file (`.corso.toml`) in the root of the home directory.
The location of the configuration file can be specified using the `--config-file` option. The location of the configuration file can be specified using the `--config-file` option.
</TabItem> </TabItem>
@ -84,9 +85,9 @@ to read or create its configuration file (`.corso.toml`). This directory must be
directory within the container. directory within the container.
```bash ```bash
$ docker run --env-file ~/.corso/corso.env \ $ docker run --env-file $HOME/.corso/corso.env \
--volume ~/.corso/corso:/app/corso \ --volume $HOME/.corso/corso:/app/corso \
corso/corso <command> <command options> ghcr.io/alcionai/corso <command> <command options>
``` ```
</TabItem> </TabItem>