I have installed the jdbc:MariaDB persistence service and configured it in the jdbc.cfg file:
And then i have configured my jdbc.persist file with the following config:
everyMinute : "0 * * * * ?"
everyHour : "0 0 * * * ?"
*temperature : strategy = everyMinute, restoreOnStartup
In my DB i can see that tables have been created and in the ITEMS table all my temperature items exists. It has also created a table for each ITEM.
But after waiting for two hours and restarting (both OH and DB) server and waiting again, there is still no data in none of the specific ITEM tables.
I cant see where i´m wrong?
Do i need to specify a default persistence service somewhere?
In the Items section of your .persist file,
* is not a wild card. It denotes one of two things:
- When used by itself it means all Items
* : strategy = everyChange, restoreOnStartup
The above saves every change to all Items and restores them all on startup
- When used after the name of a Group it means all Items that are a member of that group
gHistory*,gChart* : strategy = everyUpdate, everyMinute
The above will save every member of gHistory and gChart to the database every time they are updated and every minute.
It looks like you are trying to refer to all Item names that end in “temperature”, which is invalid. You either need to list them all individually or add them to a group and use my 2. above to save them as a Group to the DB.
It worked, Thanks!
But what i dont understand is that the DB created tables for all ITEMS (with correct item-names) with the:
I can’t answer why it did that.