I have variables saved on context fileSystem.
https://nodered.org/docs/user-guide/context
I notice that if I restart the RevPi (sudo reboot) the variables are kept.
Conversely, if the device is turned off by removing the power supply, the variables are not maintained.
How can you overcome this problem?
contextData on fileSystem
Hi,
this is probably caused by the fact, that the context is not written to the storage. When the RevPi is being shutdown / rebooted NodeRed stops gracefully and writes everything to the disk. If you just powercycle the device NodeRed has no chance of writing the context to the disk.
From the NodeRed docs https://nodered.org/docs/api/context/st ... filesystem:
this is probably caused by the fact, that the context is not written to the storage. When the RevPi is being shutdown / rebooted NodeRed stops gracefully and writes everything to the disk. If you just powercycle the device NodeRed has no chance of writing the context to the disk.
From the NodeRed docs https://nodered.org/docs/api/context/st ... filesystem:
NicolaiThe flushInterval is provided to minimise wear on the underlying storage, such as on a Raspberry Pi’s SD card. Note that if Node-RED is unexpectedly killed, any data that has not yet been flushed will be lost.
Thanks a lot, I did not know this feature.
Resolved.
Resolved.