Howto migrate influxdb data to another server on HASSIO

Managed to do this, wasn’t very complicated in the end.

The influxdb addon doesn’t have the required ports open, so remote backup is not supported. The only way I could figure out is to login to the docker container, make local backup, snapshot in hassio…

  1. Install portainer addon and disable protection mode
  2. Open portainer, remove addons from the hidden containers list in portainer settings
  3. Open exec console to influx addon, backup the database locally in the container
    influxd backup -portable -database hassio -host <local host>:8086 /data/<filename> (maybe host was not require…)
  4. Create new snapshot in supervisor, find the backup file, move to new system
  5. Restore to new database
    influxd restore -portable /data/<filename>
  6. Create matching username and pass in new influx
  7. Update configuration.yaml with new IP
  8. Stop the addon influxdb and disable autostart
    (9. change samba backup frequency from daily to weekly)

For influx installation in the remote machine I used this
https://hub.docker.com/r/philhawthorne/docker-influxdb-grafana/

7 Likes