Moving HAOS addon InfluxDB database to LXC InfluxDB #1766
-
Greetins, I recently moved my HA from a Pi to a ProxmoxVM, now I would like to move further and run InfluxDB (and later Grafana) in LXC. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 6 replies
-
You can try performing a Google search for "how to backup InfluxDB in Home Assistant" to find relevant information on this topic. It may provide you with valuable insights and guidance on how to back up InfluxDB within your Home Assistant setup. |
Beta Was this translation helpful? Give feedback.
-
The backup and restore procedure is quite well documented here: https://docs.influxdata.com/influxdb/v1.8/administration/backup_and_restore/#restore-examples |
Beta Was this translation helpful? Give feedback.
-
So my noob step-by-step I was following was this: With the next code you can make a backup of the database of your choice: Using File Editor addon, with the Enforce Basepath enabled in the configs, you can go to the location where the backup files are. Now personally I have a drive mounted in OMV and and LXC containers for plex and other -arr apps. So I mounted it into the InfluxDB LXC in it's config file located in the PVE's /etc/pve/local/lxc folder. Nano CONTAINERID.conf added the line mp0: /mnt/,mp=/mnt/ I copied the backup files to the desired folder in the mentioned drive. Completed the Influxdb setup to communicate with Home Assistant as in Tteck's guide: And now all is working like a charm. |
Beta Was this translation helpful? Give feedback.
So my noob step-by-step I was following was this:
Inside Home Assistant I used an "SSH & Terminal" addon. In the addon settings you need to turn off the Protection mode and restart the addon.
With the code below you can find out your InfluxDB container ID:
echo ] | (sudo docker ps --format "{ {{json .ID}} : {{json .Names}} }" | paste -sd',' && cat) | (echo [ && cat)
With the next code you can make a backup of the database of your choice:
sudo docker exec influxd backup -portable -database "/share/influxbackup/database-name"
Using File Editor ad…