Search code examples
influxdb

How to find out where the default influxDB data storage location on Ubuntu is?


I am running influxDB version: 1.7.8 and since my Ubuntu machine (18.04.3 LTS) is running low of storage (I have 80GB), I want to:

  1. Locate where does InfluxDB physically store the data (the big files)
  2. How to change location to another place.

From this question here I understand that there are two locations:

  • var\lib\influxdb\wal
  • var\lib\influxdb\data

When I check the first I see 4.0K file size... Which tells me it's not the right place.

my_server:~$ sudo ls -l /var/lib/influxdb/wal/ -sh
total 20K
4.0K drwx------ 3 influxdb influxdb 4.0K Jul  9  2019 _internal
4.0K drwx------ 3 influxdb influxdb 4.0K Jul 10  2019 db1
4.0K drwx------ 3 influxdb influxdb 4.0K Nov 30 12:32 db2
4.0K drwx------ 3 influxdb influxdb 4.0K Nov 30 21:50 db3
4.0K drwx------ 3 influxdb influxdb 4.0K Dec 12 00:18 db4

When I check the second, I see the same

my_server:~$ sudo ls -l /var/lib/influxdb/data/ -sh
total 20K
4.0K drwx------ 4 influxdb influxdb 4.0K Jul  9  2019 _internal
4.0K drwx------ 4 influxdb influxdb 4.0K Jul 10  2019 db1
4.0K drwx------ 4 influxdb influxdb 4.0K Nov 30 12:32 db2
4.0K drwx------ 4 influxdb influxdb 4.0K Nov 30 21:50 db3
4.0K drwx------ 4 influxdb influxdb 4.0K Dec 12 00:18 db4

At the same time I see that this file: /var/log/syslog.1 takes a crazy amount of storage (13.7GB) with DB related information.

I could not find any information about this on the InfluxDB documentation, which I think is weird.

Can anyone provide either either a link to where I can read up about this and figure it out or a solution to how I can approach to addressing my primary issues: finding out where the physical information is stored?

Thanks!


Solution

  • Those are directories..directories on Linux always show as 4KB

    Those locations are correct though

    Try du -h -d1 /var/lib/influxdb for am accurate count