Yeah, I guess that strategy won't work, at least not with a simple ".dump" command.
Can we pause for a second and ask why you are doing this? What was wrong with your old database? On Sun, May 17, 2020 at 7:01 PM Ron Sell <ronsel...@gmail.com> wrote: > Thanks. > > Got the script working but now i get this\: > Error: near line 38817: table archive has 114 columns but 59 values were > supplied > > do i need to modify the .sql to provide the difference in values? > > > On Sun, May 17, 2020 at 8:47 PM Tom Keffer <tkef...@gmail.com> wrote: > >> It's in the commands I suggested. Make a backup first. >> >> On Sun, May 17, 2020 at 5:41 PM Ron Sell <ronsel...@gmail.com> wrote: >> >>> Thanks, >>> I did the data dump. Its now an SQL file. How do I get it into the >>> weewx4.0 database? >>> >>> thanks >>> >>> >>> On Sun, May 17, 2020 at 11:06 AM Tom Keffer <tkef...@gmail.com> wrote: >>> >>>> How about doing a dump of the v3.9 database, then delete the CREATE >>>> TABLE statement. Then import into the V4 database. >>>> >>>> Something like: >>>> >>>> # Create a dump, then strip out the CREATE TABLE >>>> echo ".dump" | sqlite3 weewx3.92.sdb | sed -e 's/^CREATE TABLE//' > >>>> weewx3.92.sql >>>> # Use the results to insert into the V4.0 table >>>> sqlite3 weewx4.0.sdb < weewx3.92.sql >>>> >>>> One thing I want to stress is that there is no difference between a >>>> V3.9 database and a V4.0 database. The only difference is that V4.0 offers >>>> a new, extended schema. >>>> >>>> -tk >>>> >>>> On Sun, May 17, 2020 at 6:55 AM Ron Sell <ronsel...@gmail.com> wrote: >>>> >>>>> I upgraded to a new Pi and weewx 4.0. >>>>> >>>>> Old Pi >>>>> weexwx 3.9.2 >>>>> Database extended for more observations >>>>> 58 columns >>>>> Running for a year >>>>> >>>>> New Pi >>>>> Weewx 4.0 >>>>> Database not extended Included all of the observstions i needed in the >>>>> new version.' >>>>> 113 columns >>>>> >>>>> What is the best way to keep all my old data? >>>>> >>>>> >>>>> I can't just copy the old database 1 for 1 since they are different. >>>>> >>>>> thanks >>>>> >>>>> >>>>> -- >>>>> 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/378b9004-78d2-4a80-bccb-27b35ecdc64c%40googlegroups.com >>>>> <https://groups.google.com/d/msgid/weewx-user/378b9004-78d2-4a80-bccb-27b35ecdc64c%40googlegroups.com?utm_medium=email&utm_source=footer> >>>>> . >>>>> >>>> -- >>>> 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/CAPq0zEAL8auPoQODgMaMgepLgt9HLGDdMb-0goiLESJdt%2BEQvw%40mail.gmail.com >>>> <https://groups.google.com/d/msgid/weewx-user/CAPq0zEAL8auPoQODgMaMgepLgt9HLGDdMb-0goiLESJdt%2BEQvw%40mail.gmail.com?utm_medium=email&utm_source=footer> >>>> . >>>> >>> -- >>> 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/CABn15dYbjnGtZ%3DaNSCqrYhCBpw56uN%3DAfKYWPuxhQ7ZVF2i48Q%40mail.gmail.com >>> <https://groups.google.com/d/msgid/weewx-user/CABn15dYbjnGtZ%3DaNSCqrYhCBpw56uN%3DAfKYWPuxhQ7ZVF2i48Q%40mail.gmail.com?utm_medium=email&utm_source=footer> >>> . >>> >> -- >> 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/CAPq0zEBQAYkbKek3Gt-mMzEYb8AFBv3twPfCMFDnWu1LZsgrwg%40mail.gmail.com >> <https://groups.google.com/d/msgid/weewx-user/CAPq0zEBQAYkbKek3Gt-mMzEYb8AFBv3twPfCMFDnWu1LZsgrwg%40mail.gmail.com?utm_medium=email&utm_source=footer> >> . >> > -- > 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/CABn15dbU-yaVfDiXk03CW-f-BhVqb%3DmYGzArKKi6VbWn2EQ5_A%40mail.gmail.com > <https://groups.google.com/d/msgid/weewx-user/CABn15dbU-yaVfDiXk03CW-f-BhVqb%3DmYGzArKKi6VbWn2EQ5_A%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > -- 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/CAPq0zEBzO%3DEUDJt%2BMdtyVQ7ohP7vSU3dr_7Hy9rWg1OfVjQD_g%40mail.gmail.com.