![]() |
|
All data in the database is gone after an alert - Printable Version +- LogicMachine Forum (https://forum.logicmachine.net) +-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1) +--- Forum: General (https://forum.logicmachine.net/forumdisplay.php?fid=2) +--- Thread: All data in the database is gone after an alert (/showthread.php?tid=6137) |
All data in the database is gone after an alert - Hadeel - 03.10.2025 Hi ! In my environment I had my LM running for over 3 years. Yesterday, for the first time all data in the database was gone and all objects and scripts are lost. I can see alert log but there is no other log or error log. Have you ever experienced this ? How can I avoid it from happening? RE: All data in the database is gone after an alert - admin - 03.10.2025 Most likely a problem with the microSD card in LM. Run this script once and post what you get in Logs tab: Code: files = io.ls('/data/dbfail/')RE: All data in the database is gone after an alert - Hadeel - 03.10.2025 Thank you for looking into the inquiry! This is what I got after executing the code. RE: All data in the database is gone after an alert - admin - 06.10.2025 Run this and post the results: Code: res = io.readproc('ls -l /data/dbfail/')RE: All data in the database is gone after an alert - Hadeel - 14.10.2025 Thank you admin : ) This is what I got ! RE: All data in the database is gone after an alert - admin - 14.10.2025 It looks like you have a power fail when LM was saving the database to disk. Run this once then reboot LM: Code: os.execute('cp /data/dbfail/2.db /data/storage/scada.db')See if your objects and scripts are restored. RE: All data in the database is gone after an alert - Bba - 04.12.2025 (03.10.2025, 08:39)Hadeel Wrote: Hi ! Hello, I installed my LM for a small project approximately three months ago. About one month ago, the LM began rebooting every morning at irregular times, typically between 5:45 and 6:15. The issue is that yesterday I was able to see valid trend data, but today—after the reboot—the trend history from yesterday is missing, and only constant values are displayed. I replaced the LM with a new unit, but the behavior remains the same. Could you please advise on the next steps to resolve this issue? RE: All data in the database is gone after an alert - Daniel - 04.12.2025 You probably running out of memory and this is why LM reboots. Check what could be the reason, System load app may help. RE: All data in the database is gone after an alert - Bba - 04.12.2025 (04.12.2025, 08:29)Daniel Wrote: You probably running out of memory and this is why LM reboots. Check what could be the reason, System load app may help.Okay, but if the LM stopped me from creating trends, how would I end up running out of memory? When I create trends, I don’t get any alert that I’m running out of memory. RE: All data in the database is gone after an alert - Daniel - 04.12.2025 Trends is not the only thing which use memory. RE: All data in the database is gone after an alert - admin - 04.12.2025 Check your event scripts, there might be a loop between scripts somewhere. RE: All data in the database is gone after an alert - Bba - 04.12.2025 I only have two scheduled scripts with some IF conditions. I haven’t seen any loops here. Could you give me a checklist of what I should review? RE: All data in the database is gone after an alert - Daniel - 04.12.2025 Send me your backup to PM. Use some file storage tool and drop a link. |