Backend Services


Backend services are a little like the ugly ducklings of the tech world. They are not pretty and people rarely directly interact them, but without their support we couldn’t get a lot of the magic we enjoy everyday. Below is a listing the various backend services I have deployed to either manage my existing network environment or to support the frontend services I have up.


InfluxDB - Time series database

Notes:

  • STATUS: In use, long term storage for relevant Home Assistant data (ex. weather, power, etc.)



MQTT - Eclipse Mosquitto - IoT Messaging

Notes:

  • STATUS: In use, transports various IoT data for Home Assistant (Windows data, Blue Iris, Shelly Bluetooth, etc.)



pgAdmin - GUI/Tools for PostgreSQL



Portainer - Docker container management

Notes:

  • STATUS: In use, it does its job.



PostgreSQL - Database

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:

Notes:

  • STATUS: using as DB for Home Assistant, Nextcloud, and a few other containers



Traefik - Reverse proxy

Notes:

  • STATUS: In-use, happy with performance, need to migrate to Traefik3