Posts: 19
Threads: 8
Joined: Mar 2020
Reputation:
0
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
Posts: 7758
Threads: 42
Joined: Jun 2015
Reputation:
447
Not directly but there's an import/export feature for scripts and visualization that you can use for partial updates.
Posts: 19
Threads: 8
Joined: Mar 2020
Reputation:
0
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.
Posts: 19
Threads: 8
Joined: Mar 2020
Reputation:
0
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
Posts: 7758
Threads: 42
Joined: Jun 2015
Reputation:
447
Each trend log is stored in a separate file. Trends are stored in RAM (path: /tmp/trends/) then periodically synced to the SD card.
Posts: 19
Threads: 8
Joined: Mar 2020
Reputation:
0
Thank you. First rough test looks promising.