When is config written to sqlite file?

Hi,

just a short question:
after configuring some devices I saw that the /var/lib/homegear/db.sql file was never changed.
Thus my configuration never survives a restart. Some configuration was in it, so it must be written in certain cases.
Any ideas?

thanks for help

AFAIK depends on version. The version actually released saves upon shutdown, so you have to restart the service to be sure (see viewtopic.php?f=11&t=216&p=1443&hilit=db.sql#p1443). The upcoming versions seems too improve on this feature.

Homegear version 0.6.0-1060 run in a docker container on x86_64.
How to shut it down in daemon mode (-d) ? (I run the mosquitto in foreground)
TERM is ignored
HUP leads to:
02/08/16 22:43:51.196 Info: SIGHUP received… Reloading…
02/08/16 22:43:51.196 Error: Cannot reload. Startup is not completed.

OK, found it:
signalling HUP to the second (child) process does the job:
02/08/16 22:54:55.742 Info: SIGHUP received… Reloading…
02/08/16 22:54:55.743 Closing database…
02/08/16 22:54:55.964 Info: Backing up database…
02/08/16 22:54:56.182 Info: Reload complete.

this helps a lot, because the mentioned version still runs for days with new data without writing it back to disk.

Hey,

in Homegear 0.5 there is debug causing newly paired devices not being directly saved to the database. In Homegear 0.6 the database should be written pretty much immediately. I don’t have direct control over the actual write to the hard disk (this is managed by the database library and the kernel), but when data is changed, it is written to a cache, which is immediately saved to the database.

I hope this answers your question.

Cheers,

Sathya