--
You received this message because you are subscribed to the Google Groups "weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/2671c065-719a-4435-9657-06841af8fed7n%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/CAPq0zEDK%3DkX-zkzewA%2B%2BDXzOkBPMLBUPHaVgJ69qYbaYWNUGzw%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/fa03941e-6ea2-41fb-bf62-998ea49651ddn%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/CAPq0zEBn3MeXjYuJ5mXHYccT1Bs4zG6%2BKancwC1dnpTzThDJiw%40mail.gmail.com.
For my own personal understanding as a newcomer I would like to ask how is it possible to lose a data record using a logger such as in the Vantage Pro 2 series that should report once weewx is restarted after the backup? Wouldn't the logger have recorded the weather event and then transferred that event once weewx has restarted?
File and Database Connection Locking
During the 250 ms sleep in step 3 above, no read-lock is held on the database file and the mutex associated with pDb is not held. This allows other threads to use database connection pDb and other connections to write to the underlying database file.
If another thread or process writes to the source database while this function is sleeping, then SQLite detects this and usually restarts the backup process when sqlite3_backup_step() is next called. There is one exception to this rule: If the source database is not an in-memory database, and the write is performed from within the same process as the backup operation and uses the same database handle (pDb), then the destination database (the one opened using connection pFile) is automatically updated along with the source. The backup process may then be continued after the sqlite3_sleep() call returns as if nothing had happened.
Whether or not the backup process is restarted as a result of writes to the source database mid-backup, the user can be sure that when the backup operation is completed the backup database contains a consistent and up-to-date snapshot of the original. However:
conclusion: only seriously under-powered boxes would be unable to complete within typical 300 sec archive interval.would be good if someone with such a box gave it a try
import sqlite3con = sqlite3.connect('/opt/weewx-4.2.0-test/archive/weewx.sdb')bck = sqlite3.connect('backup.db')with bck:con.backup(bck, pages=1)bck.close()con.close()
--
You received this message because you are subscribed to the Google Groups "weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/1EBCD01F-B1C8-48AC-8D5A-DFAF8B0E20D5%40gmail.com.
--
You received this message because you are subscribed to the Google Groups "weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/22c66dc0-46e0-4406-b610-57da6e38b1f2n%40googlegroups.com.