Logic Machine Forum
Maintain trends during backup restore - Printable Version

+- Logic Machine 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: Maintain trends during backup restore (/showthread.php?tid=3855)



Maintain trends during backup restore - Christian_EWW - 04.02.2022

Is there a way to maintain the saved trends when restoring a backup from another LM?

Reason for it is, that I normally develop on a LM at the office and restore this backup at different LMs in the field.
But in the future I have to keep the already recorded trends in the machines in the field.

Thanks
Christian


RE: Maintain trends during backup restore - admin - 04.02.2022

Not directly but there's an import/export feature for scripts and visualization that you can use for partial updates.


RE: Maintain trends during backup restore - Christian_EWW - 04.02.2022

I know that it is possible to import scripts and the visualization but this is not really practical for me. I have a lot of event, cyclic and user scripts and also the objects are created via scripts and have to fit the script version. Most of the time only additional objects are added.
I already have a script that I start bevor the update to save parameters from the objects into files to restore my parameters after the new backup is restored.
I don’t have a problem when the solution would be to write a script that saves and restores the trend files from USB or so or do it via database commands.


RE: Maintain trends during backup restore - Christian_EWW - 07.02.2022

Probably it is the best, when I work directly in die SQLite DB via LUA.
I'm able to read and compare the available trend metadata db:getall('SELECT * FROM trends') , but how I can read and write the trend values? Where do I find the table with the timestamps and values?
Thanks,
Christian


RE: Maintain trends during backup restore - admin - 07.02.2022

Each trend log is stored in a separate file. Trends are stored in RAM (path: /tmp/trends/) then periodically synced to the SD card.


RE: Maintain trends during backup restore - Christian_EWW - 08.02.2022

Thank you. First rough test looks promising.