Backend Services


Container based services I am currently using:



InfluxDB - Time series database

Current: Long term storage for relevant Home Assistant data, ex. weather, power, etc.



MQTT - Eclipse Mosquitto - IoT Messaaging

Current: transports windows device data to Home Assistant using IoTLink. Plan to use this with RTL-SDR and other devices in due time.



pgAdmin - GUI/Tools for PostgreSQL



Portainer - Container management

Current: My preferred container management tool, though typically SSH after making edits to docker compose files.



PostgreSQL - Database

Current: using as DB for Home Assistant, Nextcloud, Kanboard…and wallabag when it is running

Steps to update DB across major releases

General Steps:

  1. Stop all services using the postgres DB
  2. Export all databases from postgres - see export cmd below
  3. Shutdown postgres
  4. Archive existing postgres folder (ex. postgres => postgresXX_date) in docker folder
  5. Create New postgres folder (ex. postgres) in docker folder
  6. Update docker compose to reference new postgres image and start container
  7. Confirm new postgres container is ready to accept connections (log file in portainer)
  8. Import datafile from old postgres container - see cmd below

Export/Import Commands

  • Export: docker exec -it postgres /usr/bin/pg_dumpall -U postgres > dumpfile1.sql
  • Import: docker exec -i postgres psql -U postgres < dumpfile1.sql

References:



Traefik - Reverse proxy