This is the new version of my old website. You can find the old website here: old.dl2sba.com. If you miss any information or you find bugs, please let me know by E-Mail

Logbook for basic setup of InfluxDB 1.02 on Raspberry Pi 3

Influx DB installieren

 curl -sL https://repos.influxdata.com/influxdb.key | sudo apt-key add -
source /etc/os-release
test $VERSION_ID = "7" && echo "deb https://repos.influxdata.com/debian wheezy stable" | sudo tee /etc/apt/sources.list.d/influxdb.list
test $VERSION_ID = "8" && echo "deb https://repos.influxdata.com/debian jessie stable" | sudo tee /etc/apt/sources.list.d/influxdb.list
test $VERSION_ID = "9" && echo "deb https://repos.influxdata.com/debian stretch stable" | sudo tee /etc/apt/sources.list.d/influxdb.list
sudo apt-get update
sudo apt-get install influxdb
sudo service influxdb start
sudo apt-get install influxdb-client

Launch influx shell

influx -precision rfc3339

Create iot database

create database iot

Create users

 CREATE USER "dl2sba" WITH PASSWORD 'password' WITH ALL PRIVILEGES
CREATE USER "node-red" WITH PASSWORD 'password'
GRANT ALL ON "iot" TO "node-red"

Check health of SSD

sudo smartctl -xaH /dev/sda
sudo badblocks -v /dev/sda

Relocate existing InfluxDB

Stop Daemon

sudo service influxdb stop

Edit config file

sudo vi /etc/influxdb/influxdb.conf

[meta]
# Where the metadata/raft database is stored
# dir = "/var/lib/influxdb/meta"
dir = "/influx-db/influxdb/meta"

[data]
# Controls if this node holds time series data shards in the cluster
enabled = true
# dir = "/var/lib/influxdb/data"
dir = "/influx-db/influxdb/data"
# These are the WAL settings for the storage engine >= 0.9.3
# wal-dir = "/var/lib/influxdb/wal"
wal-dir = "/influx-db/influxdb/wal"

Copy directory content

sudo cp -R --preserve=all /var/lib/influxdb /influx-db
sudo mv /var/lib/influxdb /var/lib/influxdb-old

Restart daemon

sudo service influxdb start

Backup InfluxDB

influxd backup /home/dietmar/dev/influx-backup/
influxd backup -database iot /home/dietmar/dev/influx-backup/
(c) Dietmar Krause, DL2SBA 2026 Impressum Datenschutz
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Marketing
Set of techniques which have for object the commercial strategy and in particular the market study.
Quantcast
Save