Difference between revisions of "Influxdb v1"

From UVOO Tech Wiki
Jump to navigation Jump to search
 
(5 intermediate revisions by the same user not shown)
Line 6: Line 6:
  
 
auth-enabled = true # Set to true
 
auth-enabled = true # Set to true
 +
 +
## Upgrade v1 to v2
 +
 +
### Docker
 +
- https://docs.influxdata.com/influxdb/v2.2/upgrade/v1-to-v2/docker/
 +
 +
```
 +
docker run -p 8086:8086 \
 +
  -v ${PWD}/influxdb:/var/lib/influxdb \
 +
  -v ${PWD}/influxdb2:/var/lib/influxdb2 \
 +
  -e DOCKER_INFLUXDB_INIT_MODE=upgrade \
 +
  -e DOCKER_INFLUXDB_INIT_USERNAME=admin \
 +
  -e DOCKER_INFLUXDB_INIT_PASSWORD=ypfCLASJ2dfnyCeSzVlvqAu9HpLprZF3 \
 +
  -e DOCKER_INFLUXDB_INIT_ORG=archive \
 +
  -e DOCKER_INFLUXDB_INIT_BUCKET=default \
 +
  influxdb:2.2
 +
```
 +
 +
### Non docker
 +
- https://docs.influxdata.com/influxdb/v2.2/upgrade/v1-to-v2/automatic-upgrade/
  
  
 
## Backup and Restore
 
## Backup and Restore
 
- https://docs.influxdata.com/influxdb/v1.8/administration/backup_and_restore/
 
- https://docs.influxdata.com/influxdb/v1.8/administration/backup_and_restore/
 +
 +
- https://docs.influxdata.com/influxdb/v2.2/reference/cli/influx/backup/
 +
- https://docs.influxdata.com/influxdb/v2.2/reference/cli/influx/restore/
  
 
```
 
```
Line 17: Line 40:
 
```
 
```
  
Notes
+
# Notes
 +
```
 
-db: Database name (If no database name is specified, the command restores all databases)
 
-db: Database name (If no database name is specified, the command restores all databases)
 
-newdb: New database name (Required when restoring a database that already exists)
 
-newdb: New database name (Required when restoring a database that already exists)
 +
```

Latest revision as of 03:41, 10 June 2022

https://docs.influxdata.com/influxdb/v1.8/administration/authentication_and_authorization/

https://docs.influxdata.com/influxdb/v1.8/administration/authentication_and_authorization/#admin-users

auth-enabled = true # Set to true

Upgrade v1 to v2

Docker

docker run -p 8086:8086 \
  -v ${PWD}/influxdb:/var/lib/influxdb \
  -v ${PWD}/influxdb2:/var/lib/influxdb2 \
  -e DOCKER_INFLUXDB_INIT_MODE=upgrade \
  -e DOCKER_INFLUXDB_INIT_USERNAME=admin \
  -e DOCKER_INFLUXDB_INIT_PASSWORD=ypfCLASJ2dfnyCeSzVlvqAu9HpLprZF3 \
  -e DOCKER_INFLUXDB_INIT_ORG=archive \
  -e DOCKER_INFLUXDB_INIT_BUCKET=default \
  influxdb:2.2

Non docker

Backup and Restore

mkdir portable-bkp
influxd backup -portable -host localhost:8088 portable-bkp
influxd restore -portable -host localhost:8088 portable-bkp

Notes

-db: Database name (If no database name is specified, the command restores all databases)
-newdb: New database name (Required when restoring a database that already exists)