It work fines and I use same code to make backup/restore on USB card.
Now, Rpi work on SSD , not yet on SD. I use other method for persistents on SSD : "persistence manager". How to here: https://forge.codesys.com/forum/en/4275/genmed-How%20to%20Setup%20the%20PersistenceManager%20from%20Scratch.pdf
This method work well, but I would like to make additionnal backup and restore to USB card, but with the old method, persistents aren't restore and I'm not sure backup files was good....
Persitents variables are still in "persistentVars". I add this before each variables:
{attribute'ac_persist':='PersistenceChannel'}
Could you help me?
Last edit: galexis 2020-06-05
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The files is store on path /PlcLogic/ac_perstitence. I could make copy on usb key but how to restore it after ? If I write it on /PlcLogic/ac_perstitence it should be work ? Any command to activate to load this files on memory ?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
In the past, I use a SD card with Rpi3B and a code to save persistents variables on files with a button and automatically restore persistents at boot.
It work fines and I use same code to make backup/restore on USB card.
Now, Rpi work on SSD , not yet on SD. I use other method for persistents on SSD : "persistence manager". How to here: https://forge.codesys.com/forum/en/4275/genmed-How%20to%20Setup%20the%20PersistenceManager%20from%20Scratch.pdf
This method work well, but I would like to make additionnal backup and restore to USB card, but with the old method, persistents aren't restore and I'm not sure backup files was good....
Persitents variables are still in "persistentVars". I add this before each variables:
Could you help me?
Last edit: galexis 2020-06-05
Hi Galexis,
to me your code looks good. I think I didn't get the question. Your approach should work independently of the filesystem that is used, right!?
persistence manager is a special librairy to save persistance variables .
https://forge.codesys.com/forum/en/4275/genmed-How%20to%20Setup%20the%20PersistenceManager%20from%20Scratch.pdf
If I use this code to do a backup files on usb key(security) : creation work and I don't not if files containe good value and restore doesn't work.
Last edit: galexis 2020-06-08
The files is store on path /PlcLogic/ac_perstitence. I could make copy on usb key but how to restore it after ? If I write it on /PlcLogic/ac_perstitence it should be work ? Any command to activate to load this files on memory ?