Skip to content

Commit

Permalink
Merge pull request #171 from gkotian/readme
Browse files Browse the repository at this point in the history
Minor README fixes
  • Loading branch information
acjohnson authored Jan 23, 2022
2 parents 3d4d21c + 5b2853e commit ea824c9
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ A Python-based application to backup Grafana settings using the [Grafana API](ht

The aim of this tool is to:
1. Easily backup and restore Grafana.
2. Have versioned backups`(date and time in file name)` for restoring and saving to cloud storage providers. Currently support
2. Have versioned backups`(date and time in file name)` for restoring and saving to cloud storage providers. Currently support
1. `Amazon S3`
2. `Azure Storage`
3. `GCP Cloud Storage` (Use service-account's credential file, [see here](https://cloud.google.com/storage/docs/reference/libraries#linux-or-macos))
Expand Down Expand Up @@ -53,10 +53,10 @@ export GRAFANA_URL=http://some.host.org:3000
export GRAFANA_TOKEN=eyJrIjoidUhaU2ZQQndrWFN3RRVkUnVfrT56a1JoaG9KWFFObEgiLCJuIjoiYWRtaW4iLCJpZCI6MX0=

# GRAFANA_HEADERS is optional
export GRAFANA_HEADERS=Host:some.host.org
export GRAFANA_HEADERS=Host:some.host.org
```

To create and obtain a `Token` for your Grafana server, please refer to the [official documentation](https://grafana.com/docs/grafana/latest/http_api/auth/).
To create and obtain a `Token` for your Grafana server, please refer to the [official documentation](https://grafana.com/docs/grafana/latest/http_api/auth/).

**NOTE** that you need to generate a `Token` with an `Admin` role for the backup to succeed, otherwise you will have potential permission issues.

Expand Down Expand Up @@ -129,7 +129,7 @@ docker run --user $(id -u):$(id -g) --rm --name grafana-backup-tool \
-e GRAFANA_ADMIN_PASSWORD={YOUR_GRAFANA_ADMIN_PASSWORD} \
-e VERIFY_SSL={True/False} \
-v {YOUR_BACKUP_FOLDER_ON_THE_HOST}:/opt/grafana-backup-tool/_OUTPUT_ \
alpinebased:grafana-backup
ysde:grafana-backup
```

***Example:***
Expand All @@ -142,7 +142,7 @@ docker run --user $(id -u):$(id -g) --rm --name grafana-backup-tool \
-e GRAFANA_ADMIN_PASSWORD=adminpassword \
-e VERIFY_SSL=False \
-v /tmp/backup/:/opt/grafana-backup-tool/_OUTPUT_ \
alpinebased:grafana-backup
ysde:grafana-backup
```

***S3 Example:*** Set S3 configurations in `-e` or `grafanaSettings.json`([example](https://github.com/ysde/grafana-backup-tool/blob/master/examples/grafana-backup.example.json))
Expand All @@ -157,13 +157,13 @@ docker run --user $(id -u):$(id -g) --rm --name grafana-backup-tool \
***Azure Example:*** Set Azure configurations in `-e` or `grafanaSettings.json`([example](https://github.com/ysde/grafana-backup-tool/blob/master/examples/grafana-backup.example.json))
```
-e AZURE_STORAGE_CONTAINER_NAME="azure-storage-container-name" \
-e AZURE_STORAGE_CONNECTION_STRING="azure-storage-connection-string"
-e AZURE_STORAGE_CONNECTION_STRING="azure-storage-connection-string"
```

***GCS Example:*** Set GCS configurations in `-e` or `grafanaSettings.json`([example](https://github.com/ysde/grafana-backup-tool/blob/master/examples/grafana-backup.example.json))
```
-e GCS_BUCKET_NAME="bucket-name" \
-e GOOGLE_APPLICATION_CREDENTIALS="credential-file-path"
-e GOOGLE_APPLICATION_CREDENTIALS="credential-file-path"
```


Expand All @@ -179,7 +179,7 @@ docker run --user $(id -u):$(id -g) --rm --name grafana-backup-tool \
-e RESTORE="true" \
-e ARCHIVE_FILE={THE_ARCHIVED_FILE_NAME} \
-v {YOUR_BACKUP_FOLDER_ON_THE_HOST}:/opt/grafana-backup-tool/_OUTPUT_ \
alpinebased:grafana-backup
ysde:grafana-backup
```

***Example:***
Expand All @@ -194,8 +194,8 @@ docker run --user $(id -u):$(id -g) --rm --name grafana-backup-tool \
-e RESTORE="true" \
-e ARCHIVE_FILE="202006280247.tar.gz" \
-v /tmp/backup/:/opt/grafana-backup-tool/_OUTPUT_ \
alpinebased:grafana-backup
ysde:grafana-backup
```

### Building
You can build the docker image simply by executing `make` in the root of this repo. The image will get tagged as `alpinebased:grafana-backup`
You can build the docker image simply by executing `make` in the root of this repo. The image will get tagged as `ysde:grafana-backup`

0 comments on commit ea824c9

Please sign in to comment.