This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Maintain trends during backup restore
#1
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
Reply
#2
Not directly but there's an import/export feature for scripts and visualization that you can use for partial updates.
Reply
#3
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.
Reply
#4
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
Reply
#5
Each trend log is stored in a separate file. Trends are stored in RAM (path: /tmp/trends/) then periodically synced to the SD card.
Reply
#6
Thank you. First rough test looks promising.
Reply


Forum Jump: