When reflashing a device, is it possible to configure it to use the same device UUID and configuration as it did previously?
I believe this may be possible by extracting the
config.json file from the device manually before reflashing it, then loading that same file into the image to be flashed, but I’m not sure if that works?
In the case that it is not possible to pull the
config.json file off of the device though, is there any way to get its contents through the Balena Dashboard, API or CLI? There is the
balena config read CLI command to read the configuration from a disk, but that will not work for eMMC devices where the filesystem can’t be mounted on another machine.
Reusing the original
config.json file created by Balena Dashboard or
balena config generate (before the device populates it with UUID, etc.) does not appear to work - it registers the device as a new UUID. I’m actually surprised that it does that even since I was under the impression that the generated config files were one-time-use. If they are not, is there any downside to reusing the same file to provision multiple new devices, or conversely is there any reason to create new config files for each device?