Add CQ output information for 'influxd upgrade' (#1839)

* added cq output info for influxd upgrade, closes #1837

* update to address PR feedback
pull/1862/head
Scott Anderson 2020-11-17 09:19:40 -07:00 committed by GitHub
parent fba2801ee3
commit 2a0619aa09
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 30 additions and 20 deletions

View File

@ -36,21 +36,22 @@ influxd upgrade [command]
## Flags
| Flag | | Description | Input type |
|:-----|:------------------------|:-----------------------------------------------------------------------------------------------------------|:----------:|
| `-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-level` | Supported log levels are `debug`, `info`, `warn`, and `error` (default `info`) | 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 |
| `-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 |
| Flag | | Description | Input type |
|:-----|:------------------------ |:-----------------------------------------------------------------------------------------------------------|:----------:|
| `-m` | `--bolt-path` | Path for boltdb database (default `~/.influxdbv2/influxd.bolt`) | string |
| `-b` | `--bucket` | Primary bucket name | string |
| | `--config-file` | Custom InfluxDB 1.x config file path (default `~/.influxdb/influxdb.conf`) | string |
| | `--continuous-query-export-path`| Path for exported 1.x continuous queries (default `~/continuous_queries.txt`) | 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-level` | Supported log levels are `debug`, `info`, `warn`, and `error` (default `info`) | string |
| | `--log-path` | Custom log file path (default `~/upgrade.log`) | string |
| `-o` | `--org` | Primary organization name | string |
| `-p` | `--password` | Password for username | string |
| `-r` | `--retention` | Duration bucket will retain data (default `0`; retains data infinitely) | string |
| `-t` | `--token` | 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 | |

View File

@ -60,6 +60,7 @@ but are planned for subsequent releases.
### Continuous queries
Continuous queries are replaced by **tasks** in InfluxDB 2.0.
By default, `influxd upgrade` writes all continuous queries to `~/continuous_queries.txt`.
To convert continuous queries to InfluxDB tasks, see
[Migrate continuous queries to tasks](/influxdb/v2.0/upgrade/v1-to-v2/migrate-cqs/).

View File

@ -20,8 +20,16 @@ To migrate continuous queries to InfluxDB 2.0 tasks, do the following:
## Output all InfluxDB 1.x continuous queries
To output and save all continuous queries that exist in your InfluxDB 1.x instance,
do the following:
If using the `influxd upgrade` command, by default, all continuous queries are
output to `~/continuous_queries.txt` during the upgrade process.
To customize the destination path of the continuous queries file,
use the `--continuous-query-export-path` flag with the `influxd upgrade` command.
```sh
influxd upgrade --continuous-query-export-path /path/to/continuous_queries.txt
```
**To manually output continuous queries:**
1. Use the InfluxDB 1.x `influx` interactive shell to run `show continuous queries`: