Thank you to everyone that offered advice. I was able to get my system restored. My daily backups went sour around 12-29-2020. I guess 2020's final blow. I was able to use the sqlite3 .read command to restore the database and then pulled weather station data from wunderground for missing days.
On Tue, Jan 19, 2021 at 9:39 PM p q <peterquinn...@gmail.com> wrote: > I don't know anything, but I can google... > > https://stackoverflow.com/questions/311691/importing-a-sqlite3-dump-back-into-the-database > > > On Tue, Jan 19, 2021 at 7:35 PM Kevin Chapman <kdchap...@gmail.com> wrote: > >> Ok the file command is showing the backups to be large ASCII files. The >> backup command script is using the sqlite3 .dump command. The ascii files >> are the SQL commands to rebuild the file. Here is the code. >> >> >> echo 'stop the weewx daemon and wait 30 seconds' >> sudo /usr/sbin/service weewx stop >> retn_code=$? >> if [ $retn_code -ne 0 ]; then >> exit 7 >> fi >> >> sleep 30s >> >> echo 'dump sqlite3 database' >> echo '.dump' | sqlite3 $WEEWX_DB | gzip -c > $DUMP_FILE >> >> echo 'restart the weewx daemon' >> sudo /usr/sbin/service weewx start >> >> I am not good with sqlite. I have read a few different sites talking >> about how to read a dump file into a database. So far I am not having luck >> recovering my database. If anyone has a site they trust or have a quick >> command for recovering sqlite dump files it would be much appreciated. So >> far when I run sqlite3 <DB> and then .read <dump file> It seems to run >> but in about 30 seconds ends at the prompt with no errors on screen and the >> database file is empty. >> >> Thank you all for your input and time. >> >> On Monday, January 18, 2021 at 9:20:59 PM UTC-6 vince wrote: >> >>> On Monday, January 18, 2021 at 6:47:09 PM UTC-8 kdch...@gmail.com wrote: >>> >>>> Now when I try to copy the unpacked sdb and pick up where I left off I >>>> get a message that the file is not a database. I have tried a couple of >>>> archives from Dec and Jan. All seem to be no good. I did notice that when >>>> I reinstalled weewx it is now version 4.3.0. Could I be dealing with a >>>> system version mismatch in the file or is there something wrong with my >>>> backup process. >>>> >>> >>> Very likely a backup process issue, although the steps you mentioned >>> looked good to me. >>> >>> We'd need to see some actual logs or terminal errors to know for certain >>> what you're actually seeing. >>> >>> I guess what I'd do is: >>> >>> - grab a recent backup, copy it to a scratch directory >>> - uncompress it to a .sdb file >>> - run 'file' against the .sdb file >>> - If it shows up as a sqlite3 db, then you can validate it with the >>> sqlite3 utility. >>> >>> >>> Good output looks like.... >>> >>> # file weewx.sdb >>> weewx.sdb: SQLite 3.x database, last written using SQLite version 3026000 >>> >>> # echo "pragma integrity_check" | sqlite3 weewx.sdb >>> ok >>> >>> >>> -- >> 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. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/weewx-user/52eb0a6c-a7d1-4fcf-9f22-717f6bfe22fdn%40googlegroups.com >> <https://groups.google.com/d/msgid/weewx-user/52eb0a6c-a7d1-4fcf-9f22-717f6bfe22fdn%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> > > > -- > Peter Quinn > (415)794-2264 > > -- > 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/7B1GyPjoDME/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > weewx-user+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/weewx-user/CAA1SM22FHfufJ-cSdUu9Msufu3U%3DpGi7UsDGeWrNOD07XUjLug%40mail.gmail.com > <https://groups.google.com/d/msgid/weewx-user/CAA1SM22FHfufJ-cSdUu9Msufu3U%3DpGi7UsDGeWrNOD07XUjLug%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > -- ------------------------------------------------------------------------------------------------- Kevin Chapman (713) 245-9368 Life is a food chain. Be at the top or be on the menu! ------------------------------------------------------------------------------------------------- -- 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. To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/CACwjpb08yyEhdLZ_rhTY9j93Rn3ftOtWX7jy9iJzJVpyQZKS2g%40mail.gmail.com.