The default location of the influxDB data is /var/lib/influxdb. If you want to change the location, you’ll need to configure three folders to be in a different place. The changes should be done in the file /etc/influxdb/influxdb.conf
... [meta] # Where the metadata/raft database is stored #dir = "/var/lib/influxdb/meta" dir = "/mnt/databases/influxdb/meta" ... [data] # The directory where the TSM storage engine stores TSM files. #dir = "/var/lib/influxdb/data" dir = "/mnt/databases/influxdb/data" # The directory where the TSM storage engine stores WAL files. #wal-dir = "/var/lib/influxdb/wal" wal-dir = "/mnt/databases/influxdb/wal"
I’m using this to store the data on a NFS share which is mounted automatically. If you want to keep your existing data, move the existing content of /var/lib/influxdb to the new location.
Make sure, that the new location is owned by influxdb user and group.