Multiple databases

Hello, my name is Francisco.

I open a new topic due to the lack of information I have found about it, I hope someone can help me. I explain you my problem:

I have implemented Chirpstack from docker-compose by getting the “chirpstack” database in the postgres container. In order to save the uplinks I have done the postgres integration getting another database, “chirpstack_integration”. My goal now is to be able to implement another database to be able to work on it and leave the “chirpstack_integration” one as a backup.
I don’t know how I can create this other database so that chirpstack also sends the data to this new one. I have thought about modifying the chirpstack.toml file but I am not sure if it is possible to have 2 dsn, if I can create a new postgres integration or how to do it.

Any help is appreciated.
Thanks for the attention.
All the best.

I don’t know if there is a way to add the postgres integration two times.

You mentioned you want to keep one as a backup - why don’t you create periodic backups of the integration database instead using pgdump? IMHO a proper backup strategy is more reasonable than running two databases.

Other ideas:

  • Create a replication setup.
  • pgdump/pgrestore/psql as an easy vehicle to move data from the live db to the backup db
  • Data pipeline to copy data from live to backup db
1 Like

Hi Pasukaru,

Thank you for responding to me so soon. I forgot to mention that I want the two databases to be separate, that is, I don’t want one database to pull the data from the other but I want it to go directly from Chirpstack.
Another option that I have thought about is to use RabbitMQ or Kaftka to send the data to a database created by me. What is your opinion on this?

Thank you very much for your attention.
All the best,
Francisco J.