Hi everyone, I’m trying to develop a way to ‘back up’ devices for Chirpstack V4 and V3 but I am having trouble understanding how the Application Session Keys are generated between the two versions. I am able to ‘backup’ devices onto our system by adding them back to Chirpstack via the API by setting the DevEui and NtwK . On V4 the AppSKey is retained which allows my devices to continue running without the need of making them join again. I follow the same process on V3, however the AppSKey is given a placeholder of 0s which forces me to reconnect the devices to generate a new AppSKey. Is anyone able to shed some light on how the generation differs or if there is a way to manually set the AppSKey via the API?
In Chirpstack v4.7 the device session keys were moved from redis to postgres, this could be part of your issue (read the release notes for more info). Although if you are strictly using the API to retrieve and add the keys back I don’t see why this would be your issue.
Have you considered just doing a full backup or is there a reason why you only want to backup the devices? By doing a pg_dumpall of the postgres database and duplicating the redis dump.rdb file you can do a full backup of your chirpstack server in just a few commands.