Recently when my Pi restarts, the node red code that it loads is not the latest. I can make changes and deploy (both full and modified nodes) and the changes work and remain. If the pi restarts, these changes are no longer present. It keeps reverting to the same previous state.
Any ideas how to stop this?
EDIT: Also, it is only after the pi totally restarts. If I simply restart node red it keeps my latest changes.
+1 for it being the card. I have had that a couple of times, it appears to work perfectly fine, you can write to files and then read the file back and all is well, until you power cycle at which point it goes back to square one. I think the RAM cache on the card still works but it can't write to the permanent store.
That makes sense. Should I be able to easily test this? If I created a random file, then rebooted, if it was the SD card the file would be gone?
EDIT: Tried this, and file did not persist after reboot. Must be the SD card. Which also adds up because I recently starting using influxdb so I mustve stressed it.
Make a copy with win32 disk image and you are up and running in a hour again.
For the future, buy cards that are much bigger then you need. The os has than more room to spread the wearing.
And buy high endurance sd cards, they last much longer.
Great advice, this SD card was from years ago. Looking into running influx on my PC with an SSD and just sending data to it from the pi so theres no writing at all on the pi's end. When I setup influx a few months ago I was worried about corruption, but the fact that I could deploy still threw me off. Didnt think about the RAM.