Assign re-flashed device to existing UUID/name?

Hi Georgia,

In this particular case, we were reverting the base OS image in order to test something. We wanted to keep the same UUID so all of the device’s environment variables with settings, access keys, etc. would get restored without having to manually enter them all again as there’s no way to copy environment variables from one device to another. Even then it would still be easier to just reinstate them since you might have to copy a number of parameters individually.

The other, more minor benefit to keeping the same UUID is that whoever is working with that device doesn’t need to go find a different UUID to enter into CLI commands. Not really a big deal, just worth pointing out since some of the CLI commands accept both device name and UUID, and others only take UUID. For example, it would be really helpful to refer to a device by name when using balena ssh, balena tunnel, and balena logs. If all CLI commands took both and the developer could do everything with human-friendly device names instead of UUIDs, that would be ideal. Not sure how difficult of a change that would be for the CLI team.

Cheers,

Adam