Edit `influxd upgrade` docs (#1701)

* Start work editing influxd upgrade

* Update flags for `influxd upgrade`

* Add more information about command

* Address PR feedback

* More PR work

* PR feedback

* Add note in upgrade guide

Co-authored-by: pierwill <pierwill@users.noreply.github.com>
pull/1745/head
pierwill 2020-10-29 16:48:15 -07:00 committed by GitHub
commit d9b6f947cf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 34 additions and 8 deletions

View File

@ -17,6 +17,18 @@ over to [buckets](/influxdb/v2.0/reference/glossary/#bucket) (used in 2.0).
Be sure to back up all data before upgrading with `influx upgrade`.
{{% /warn %}}
This command performs the following actions:
1. Creates the InfluxDB 2.x configuration file using 1.x configuration file options.
Unsupported 1.x options are reported to standard output.
If the configuration file is not available, the 1.x database folder can be passed via th `--v1-dir` flag.
2. Copies and upgrades 1.x database files.
3. Creates a script that creates tokens for 1.x users.
This script needs to be revised and run manually after starting 2.x.
The target 2.x database directory is specified by the `--engine-path` option.
If changed, the bolt path can be specified by the `--bolt-path` option.
## Usage
```
@ -27,8 +39,20 @@ influxd upgrade [command]
## Flags
| Flag | | Description | Input type |
|:-----|:-----------------|:----------------------------------------------------------------------------------------------|:----------:|
| `-h` | `--help` | Help for the `upgrade` command | |
| | `--config` | (Optional) Custom InfluxDB path to 1.x config file to upgrade (default: `~/.influxdbv2/conf`) | string |
| | `--v1-meta-dir` | Path to 1.x meta.db directory (default: `~/.influxdb/meta`) | string |
| | `--v2-bolt-path` | Path to 2.0 BoltDB database (default: `~/.influxdbv2/influxd.bolt`) | string |
|:-----|:------------------------|:-----------------------------------------------------------------------------------------------------------|:----------:|
| `-m` | `--bolt-path` | Path for boltdb database (default `~/.influxdbv2/influxd.bolt`) | string |
| `-b` | `--bucket` | Primary bucket name | string |
| | `--config-file` | (Optional) Custom InfluxDB 1.x config file path, else the default config file | string |
| `-e` | `--engine-path` | Path for persistent engine files (default `~/.influxdbv2/engine`) | string |
| `-f` | `--force` | Skip the confirmation prompt | |
| `-h` | `--help` | Help for `influxd upgrade` | |
| | `--influx-command-path` | Path to influx command (default `~/go/bin/influx`) | string |
| | `--log-path` | (Optional) Custom log file path (default `~/upgrade.log`) | string |
| `-o` | `--org` | Primary organization name | string |
| `-p` | `--password` | Password for username | string |
| `-r` | `--retention` | (Optional) Duration bucket will retain data (default `0`; retains data infinitely) | string |
| | `--security-script` | (Optional) Generated security upgrade script path (default `~/influxd-upgrade-security.sh`) | string |
| `-t` | `--token` | (Optional) Token for username. If not specified, a token is auto-generated. | string |
| `-u` | `--username` | Primary username | string |
| | `--v1-dir` | Path to source 1.x `db` directory containing `meta`, `data`, and `wal` sub-folders (default `~/.influxdb`) | string |
| `-v` | `--verbose` | Verbose output (default: `true`) | boolean |

View File

@ -32,3 +32,5 @@ Back up all data before upgrading with `influx upgrade`.
```
4. Follow the prompts to set up a new InfluxDB 2.0 instance.
For more information on upgrading, including how to handle non-standard installations, see [`influxd upgrade`](/influxdb/v2.0/reference/cli/influxd/upgrade/).