Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added restoring chronogaf db info, fixed config-options h4s #1613

Merged
merged 2 commits into from
May 17, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 29 additions & 29 deletions content/chronograf/v1.4/administration/config-options.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,35 +76,35 @@ Default value: `./chronograf-v1.db`

Environment variable: `$BOLT_PATH`

####`--canned-path=` | `-c`
#### `--canned-path=` | `-c`

The path to the directory of [canned dashboards](/chronograf/latest/troubleshooting/frequently-asked-questions/#what-applications-are-supported-in-chronograf) files.
The path to the directory of [canned dashboards](/chronograf/latest/guides/using-precreated-dashboards/) files.

Default value: `/usr/share/chronograf/canned`

Environment variable: `$CANNED_PATH`

####`--basepath=` | `-p`
#### `--basepath=` | `-p`

The URL path prefix under which all `chronograf` routes will be mounted.

Environment variable: `$BASE_PATH`

####`--prefix-routes`
#### `--prefix-routes`

Forces the `chronograf` service to require that all requests are prefixed with the value set in `--basepath`.

Environment variable: `$PREFIX_ROUTES`

####`--status-feed-url=`
#### `--status-feed-url=`

URL of JSON feed to display as a news feed on the client Status page.

Default value: `https://www.influxdata.com/feed/json`

Environment variable: `$STATUS_FEED_URL`

####`--version` | `-v`
#### `--version` | `-v`

Displays the version of the Chronograf service.

Expand Down Expand Up @@ -177,7 +177,7 @@ Environment variable: `$TLS_PRIVATE_KEY`

### Other service options

####`--custom-link <display_name>:<link_address>`
#### `--custom-link <display_name>:<link_address>`

Custom link added to Chronograf User menu options. Useful for providing links to internal company resources for your Chronograf users. Can be used when any OAuth 2.0 authentication is enabled. To add another custom link, repeat the custom link option.

Expand Down Expand Up @@ -206,21 +206,21 @@ Environment variable: `$LOG_LEVEL`

Run the `chronograf` service in developer mode.

####`--help` | `-h`
#### `--help` | `-h`

Displays the command line help for `chronograf`.

## Authentication options

### General authentication options

####`--token-secret=` | `-t`
#### `--token-secret=` | `-t`

The secret for signing tokens.

Environment variable: `$TOKEN_SECRET`

####`--auth-duration=`
#### `--auth-duration=`

The total duration (in hours) of cookie life for authentication.

Expand All @@ -230,7 +230,7 @@ Authentication expires on browser close when `--auth-duration=0`.

Environment variable: `$AUTH_DURATION`

####`--public-url=`
#### `--public-url=`

The public URL required to access Chronograf using a web browser. For example, if you access Chronograf using the default URL, the public URL value would be `http://localhost:8888`.
Required for Google OAuth 2.0 authentication. Used for Auth0 and some generic OAuth 2.0 authentication providers.
Expand All @@ -242,19 +242,19 @@ Environment variable: `$PUBLIC_URL`

See [Configuring GitHub authentication](/chronograf/v1.4/administration/managing-security/#configuring-github-authentication) for more information.

####`--github-client-id=` | `-i`
#### `--github-client-id=` | `-i`

The GitHub client ID value for OAuth 2.0 support.

Environment variable: `$GH_CLIENT_ID`

####`--github-client-secret=` | `-s`
#### `--github-client-secret=` | `-s`

The GitHub Client Secret value for OAuth 2.0 support.

Environment variable: `$GH_CLIENT_SECRET`

####`--github-organization=` | `-o`
#### `--github-organization=` | `-o`

[Optional] Specify a GitHub organization membership required for a user.

Expand All @@ -264,19 +264,19 @@ Environment variable: `$GH_ORGS`

See [Configuring Google authentication](/chronograf/v1.4/administration/managing-security/#configuring-google-authentication) for more information.

####`--google-client-id=`
#### `--google-client-id=`

The Google Client ID value required for OAuth 2.0 support.

Environment variable: `$GOOGLE_CLIENT_ID`

####`--google-client-secret=`
#### `--google-client-secret=`

The Google Client Secret value required for OAuth 2.0 support.

Environment variable: `$GOOGLE_CLIENT_SECRET`

####`--google-domains=`
#### `--google-domains=`

[Optional] Restricts authorization to users from specified Google email domains.

Expand All @@ -286,27 +286,27 @@ Environment variable: `$GOOGLE_DOMAINS`

See [Configuring Auth0 authentication](/chronograf/v1.4/administration/managing-security/#configuring-auth0-authentication) for more information.

####`--auth0-domain=`
#### `--auth0-domain=`

The subdomain of your Auth0 client; available on the configuration page for your Auth0 client.

Example: https://myauth0client.auth0.com

Environment variable: `$AUTH0_DOMAIN`

####`--auth0-client-id=`
#### `--auth0-client-id=`

The Auth0 Client ID value required for OAuth 2.0 support.

Environment variable: `$AUTH0_CLIENT_ID`

####`--auth0-client-secret=`
#### `--auth0-client-secret=`

The Auth0 Client Secret value required for OAuth 2.0 support.

Environment variable: `$AUTH0_CLIENT_SECRET`

####`--auth0-organizations=`
#### `--auth0-organizations=`

[Optional] The Auth0 organization membership required to access Chronograf.
Organizations are set using an "organization" key in the user's `app_metadata`.
Expand Down Expand Up @@ -339,54 +339,54 @@ Lists are comma-separated.

See [Configuring Generic authentication](/chronograf/v1.4/administration/managing-security/#configuring-generic-authentication) for more information.

####`--generic-name=`
#### `--generic-name=`

The generic OAuth 2.0 name presented on the login page.

Environment variable: `$GENERIC_NAME`

####`--generic-client-id=`
#### `--generic-client-id=`

The generic OAuth 2.0 Client ID value.
Can be used for a custom OAuth 2.0 service.

Environment variable: `$GENERIC_CLIENT_ID`

####`--generic-client-secret=`
#### `--generic-client-secret=`

The generic OAuth 2.0 Client Secret value.

Environment variable: `$GENERIC_CLIENT_SECRET`

####`--generic-scopes=`
#### `--generic-scopes=`

The scopes requested by provider of web client.

Default value: `user:email`

Environment variable: `$GENERIC_SCOPES`

####`--generic-domains=`
#### `--generic-domains=`

The email domain required for user email addresses.

Example: `--generic-domains=example.com`

Environment variable: `$GENERIC_DOMAINS`

####`--generic-auth-url=`
#### `--generic-auth-url=`

The authorization endpoint URL for the OAuth 2.0 provider.

Environment variable: `$GENERIC_AUTH_URL`

####`--generic-token-url=`
#### `--generic-token-url=`

The token endpoint URL for the OAuth 2.0 provider.

Environment variable: `$GENERIC_TOKEN_URL`

####`--generic-api-url=`
#### `--generic-api-url=`

The URL that returns OpenID UserInfo-compatible information.

Expand Down
81 changes: 81 additions & 0 deletions content/chronograf/v1.4/administration/restoring-chronograf-db.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
---
title: Restoring a Chronograf database
description: 'An outline of the process required to roll the Chronoraf internal database back to a previous version and/or rerun update migrations.'
menu:
chronograf_1_4:
weight: 110
parent: Administration
---

Chronograf uses [Bolt](https://github.com/boltdb/bolt) to store Chronograf-specific key-value data.
Generally speaking, you should never have to manually administer your internal Chronograf database.
However, rolling back to a previous version of Chronograf does require restoring
the data and data-structure specific to that version.

Chronograf's internal database, `chronograf-v1.db`, is stored at your specified
[`--bolt-path`](/chronograf/v1.4/administration/config-options/#bolt-path-b) which,
by default, is the current working directory where the `chronograf` binary is executed.
In the upgrade process, an unmodified backup of your Chronograf data is stored inside the
`backup` directory before any necessary migrations are run.
This is done as a convenience in case issues arise with the data migrations
or the upgrade process in general.

The `backup` directory is a sibling of your `chronograf-v1.db` file.
Each backup file is appended with the corresponding Chronograf version.
For example, if you moved from Chronograf 1.4.3.3 to 1.4.4.2, there will be a
file called `backup/chronograf-v1.db.1.4.3.3`.

_**Chronograf backup directory structure**_
```
chronograf-working-dir/
├── chronograf-v1.db
├── backup/
| ├── chronograf-v1.db.1.4.3.1
| ├── chronograf-v1.db.1.4.3.2
| └── chronograf-v1.db.1.4.3.3
└── ...
```

## Rolling back to a previous version
If there is an issue during the upgrade process or you simply want/need to roll
back to an earlier version of Chronograf, you must restore the data file
associated with that specific version, then downgrade and restart Chronograf.

The process is as follows:

### 1. Locate your desired backup file
Inside your `backup` directory, locate the database file with a the appended Chronograf
version that corresponds to the version to which you are rolling back.
For example, if rolling back to 1.4.3.3, find `backup/chronograf-v1.db.1.4.3.3`.

### 2. Stop your Chronograf server
Stop the Chronograf server by killing the `chronograf` process.

### 3. Replace your current database with the backup
Remove the current database file and replace it with the desired backup file:

```bash
# Remove the current database
rm chronograf-v1.db

# Replace it with the desired backup file
cp backup/chronograf-v1.db.1.4.3.3 chronograf-v1.db
```

### 4. Install the desired Chronograf version
Install the desired Chronograf version.
Chronograf releases can be viewed and downloaded either from the
[InfluxData downloads](https://portal.influxdata.com/downloads#chronograf)
page or from the [Chronograf releases](https://github.com/influxdata/chronograf/releases)
page on Github.

### 5. Start the Chronograf server
Restart the Chronograf server.
Chronograf will use the `chronograf-v1.db` in the current working directory.

## Rerunning update migrations
This process can also be used to rerun Chronograf update migrations.
Go through steps 1-5, but on [step 3](#3-replace-your-current-database-with-the-backup)
select the backup you want to use as a base for the migrations.
When Chronograf starts again, it will automatically run the data migrations
required for the installed version.
Loading