Gary Many Thanks. I will try this process. My station is a Davis Vantage Pro 2 with IP datalogger - does anyone know if this will allow weewx to "catch-up" if the weewx service has been stopped for a while for some database management, or will the records that would have normally been created in the downtime, be lost?
David. On 15 April 2018 at 04:51, Glenn McKechnie <glenn.mckech...@gmail.com> wrote: > I note that you say that you know how to edit the database, so the > following points may appear to be redundant. But for the benefit for > someone reading this thread later, that may not have the same confidence as > yourself, I'll include them anyway. > > > should I stop the weewx service, work on the database and then start the > weewx service again (it might take me anything between 10 mins and a few > hours to do this). > > If it's the default sqlite (weewx.sdb) database then you have no option. > If you start editing the live database you'll lock it and weewx will halt > all writes to it. > You say 10 minutes to an hour so you won't want that. > . > For others , that may or may not be a problem, but be aware of it. > > You can get away with copying the sqlite while weewx is running, try and > do it during the report cycle if you feel nervous (no writes, only reads). > If you want 100% surity then stop it, you'll have then removed another > potentional hiccup. > > You can dump a mysql database while it's running. You can also edit it on > the fly without getting into serious problems, but if you make a mistake??? > See Rule #1 below. > > So > Unless you like living on the edge... > Rule #1 says to make a copy of the database. > Optional Rule #2 suggests to make another copy and work on that. > > When you've got the process down pat - ie: you're satisfied with what you > are doing and the results are good, then you can swap over the databases. > Or if a longtime has elapsed, make another copy, fix that with your > recently honed process and swap it back in (with fewer values missed.) > weewx will be stopped while you do all that. > > > If I stop the service, will weewx automatically reload all the database > entries for the time period when it was stopped in the previous step. > > Depends on the weather station. Some will catch up, others won't (or > can't) > > See if your station gets a mention in the online documentation or tell the > group what the station is and someone with more authority may be able to > answer that question. Mine can't > > If it won't, you can dump the pre-swap database, edit and extract the new > entries and insert them into the new copy , which shouldn't take too long - > even with the precautions outlined above. > > > Cheers > Glenn > > rorpi - read only raspberry pi & various weewx addons > https://github.com/glennmckechnie > > On 15 April 2018 at 01:54, <dhind...@djhindley.com> wrote: > >> I am in the process of importing some data to the database and making >> some corrections to the data once imported. I know how to do this, but am >> not sure what the best/recommended workflow process is. For example: >> >> - should I stop the weewx service, work on the database and then start >> the weewx service again (it might take me anything between 10 mins and a >> few hours to do this). >> - If I stop the service, will weewx automatically reload all the >> database entries for the time period when it was stopped in the previous >> step. >> >> Or, should I not bother stopping the service, and if so, will this cause >> any problems if I am working on the database whilst weewx is trying to save >> records to it? >> >> Any help/tips are appreciated. >> >> Thanks >> >> David. >> >> -- >> 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+unsubscr...@googlegroups.com. >> For more options, visit https://groups.google.com/d/optout. >> > > -- > You received this message because you are subscribed to a topic in the > Google Groups "weewx-user" group. > To unsubscribe from this topic, visit https://groups.google.com/d/ > topic/weewx-user/3EgxZ01zaKc/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > weewx-user+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- 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+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.