Lets say the following applications exists:
All new devices are installed with the “No_Config” application.
When ready a device is moved to the ‘Calibration’ application. The purpose of this is to setup device specific data which should be persisted for the entire lifespan of the device. This includes Unique ID, calibration data and other config data.
When calibrated and ready, then swap to ‘Nice_Software’. Boom… persistent data is no more.
Is it possible to avoid automatic purge of data when swapping from one application to another?
As per https://docs.resin.io/learn/manage/actions/#move-to-another-application the following is stated:
“Warning: For devices running resinOS version 2.12.0 and above, data in persistent storage (named volumes) is automatically purged when a device is moved to a new application.”
Can this automatic purge be avoided?
I have not found any environment variables to control the automatic purge features.
If no solution exist, then it would be ideal to add an automatic purge option on the application. Which would apply for all devices in the given application.
For the above use case the automatic purge would only be enabled on the “No_Config”. All other applications would not automatic purge data.
This could also be extended to allow device override of the automatic purge option. Meaning that a device inherit the automatic purge option from the application, but can be overwritten.