Network and Application server backup


I was wondering if there is a tutorial on how to backup and restore all the configuration in application and network server. Recently I’ve decided to transfer my server to a new machine so I figured that this is an opportunity to update to the latest version as well, but I couldn’t seamless integrate the configuration and devices from the old server. I had to do it all over again.

ps I’m using the docker version now with compose :slight_smile:

Any suggestions on what to google?

Thanks in advance!

You need to backup both PostgreSQL (using pg_dump) databases and your Redis database.

Will such a backup be suitable to use as migration between versions of loraserver as well? How static is the database schema?

Which databases? Only Loraserver_as and loraserver_ns or what?

Did you resolve it?
Which databases? Only Loraserver_as and loraserver_ns or what?

Yes. LoRa Server and LoRa App Server both are using a migrations tool that apply missing schema changes on start (it tracks the migrations that have been applied so that it can detect which missing migrations to apply to your db scheme). See for example this folder:

Hmm, I did

  • pg_dumpall -U postgres > dump.sql on our production server
  • psql -U postgres < dump.sql on a fresh install
  • docker-compose up loraserver

and it responded

loraserver_1  | time="2019-04-05T09:21:57Z" level=fatal msg="applying migrations failed: Unable to create migration plan because of 0020_device_add_mode.sql: unknown migration in database"