Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

165
Views
How to change influxdb storage location

I have installed influxdb in docker container (Kubernetes) and I have mounted a persistent volume to that container. But influxdb is not writing data to that volume. Can anyone please tell me steps, so that influxdb will write data in particular volume. Thanks

about 4 years ago · Santiago Trujillo
3 answers
Answer question

0

Short Answer:

   $ docker run -p 8083:8083 -p 8086:8086 \
          -v $PWD:/var/lib/influxdb \
          influxdb

Modify $PWD with the path to external volume.

Long answer:

docker run -p 8083:8083 -p 8086:8086 influxdb

By default this will store the data in /var/lib/influxdb. All InfluxDB data lives in there. To make that a persistent volume (recommended):

$ docker run -p 8083:8083 -p 8086:8086 \
      -v $PWD:/var/lib/influxdb \
      influxdb

Modify $PWD to the directory where you want to store data associated with the InfluxDB container.

For example,

 $ docker run -p 8083:8083 -p 8086:8086 \
              -v /your/home:/var/lib/influxdb \
              influxdb

This will store the influx data in /your/home on the host.

about 4 years ago · Santiago Trujillo Report

0

For InfluxDB 2.0:

In InfluxDB 2.0 (or 2.0.3 at least) the data directory has changed. Things are now stored under ~/.influxdbv2 by default (where ~ is /root/ in the quay.io/influxdb/influxdb:v2.0.3 image), which does not seem very docker-ish to me.

Actually, there are 2 data storages for bolt (various key-value configurations) and engine (the TSM database). If you like, you could change them via the --engine-path=/data/engine --bolt-path=/data/bolt paramaters to influxd.

The following docker-compose.yml should therefore store the InfluxDB2 data into a volume.

version: '3.3'
services:
  influxdb:
    image: 'quay.io/influxdb/influxdb:v2.0.3'
    restart: unless-stopped
    ports:
      - '8086:8086'
    volumes:
      - data:/root/.influxdbv2
volumes:
  data:

Right now, there is no official _/influxdb:2.0 on Docker Hub (see also influxdb#16649). I hope that this image (once released) has some better defaults (quay.io/influxdb/influxdb:v2.0.3 does not even create an anonymous volume; any data is lost therefore once the container is removed). So please check Docker Hub if there is an image InfluxDB 2.0 before trying these things here.

about 4 years ago · Santiago Trujillo Report

0

If you pulled official influxdb image from docker library, the default path for data files is:

/var/lib/influxdb

To verify, Run an standalone instance:

docker run -p 8083:8083 -p 8086:8086 \
      -v $PWD:/var/lib/influxdb \
      influxdb

To check out the default config:

docker run --rm influxdb influxd config > influxdb.conf

Then use vim influxdb.conf

To run influxdb with custom config:

docker run -p 8086:8086 \
      -v $PWD/influxdb.conf:/etc/influxdb/influxdb.conf:ro \
      influxdb -config /etc/influxdb/influxdb.conf
about 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!