yes, you need to have the same number of columns in both to do the 
save+restore.   You can convert (update) your smaller file to the newer 
(bigger) extended schema that is the current default.

One previous discussion was here 
(https://groups.google.com/g/weewx-user/c/dWrjoKS3Hok/m/I9urZRClBAAJ)
On Monday, September 19, 2022 at 5:47:32 PM UTC-7 [email protected] wrote:

> Thanks for the reply. I tried what I think you said and can't restore. 
> I have 2 databases call them w177.sdb and w166.sdb . 
> w177 has 6 years of data from 2016 to Aug 4, 2021, w166.sdb has 1 year of 
> data from Sept 2021. 
> I want to combine them.
> I  did a sqlite3 w166.sdp . dump archive > dum166.sql. 
> Tried a sqlite3 w177.sdb < dum166.sql 
>          and it sure didn't like that, complained  table archive has 52 
> columns but 114 values were supplied & UNIQUE constraint failed: 
> archive_day_***** for all of them.
> Tried a sqlite3 .restore w177.sdb dum166.sql 
>        and that did not work
>
> Any suggestions on what I am doing wrong?
>
> On Monday, September 19, 2022 at 12:44:15 PM UTC-6 vince wrote:
>
>> Dump and restore the archive table and ignore any 'duplicate entry' 
>> warnings you might see....
>>
>> As always work off 'copies' of your databases...
>>
>> On Monday, September 19, 2022 at 9:33:16 AM UTC-7 [email protected] 
>> wrote:
>>
>>> According to what I am seeing in sqlitebrowser, I have managed to mess 
>>> up the database and its backup. It goes from August 4, 2021 to August 2, 
>>> 2022 with nothing in between. Of course I was not smart enough to save any 
>>> of the *.txt files in  the NOAA directory. And my other database backup is 
>>> from August 4, 2021 which was in /home/weewx/Documents. Seems strange that 
>>> is the date. Oh well. I do have another machine that was reading the exact 
>>> same data for that period using a SDR so now all I have to do is somehow 
>>> piecemeal the 2 databases to get the data for Aug 4,2021 through Aug 2, 
>>> 2022 into the database that has data from 2016.  
>>>
>>> Any suggestions as how to pick data from one database and put it in the 
>>> other database? I assume I will have to use sqlite3.
>>>
>>> On Thursday, September 15, 2022 at 6:37:46 PM UTC-6 gjr80 wrote:
>>>
>>>> First thing to do if you are viewing the file(s) via a web browser is 
>>>> to clear the browser cache. You can try viewing the files directly via an 
>>>> editor or cat'ing them to a console. Second thing to try is forcing WeeWX 
>>>> to regenerate all of your NOAA format month and year files. Delete all of 
>>>> the month and year files on your WeeWX machine, wait for the next report 
>>>> cycle to complete during which WeeWX will regenerate them all. Be patient, 
>>>> depending on how much data you have in your database it could take a 
>>>> while. 
>>>> Once they have be regenerated have look and see what's there. Again be 
>>>> careful of browser caches if viewing via a browser.
>>>>
>>>> If you still have issues post back here.
>>>>
>>>> Gary
>>>>
>>>> On Friday, 16 September 2022 at 09:04:52 UTC+10 [email protected] 
>>>> wrote:
>>>>
>>>>> I stopped weewx, copied the data base weewx.sdb to a backup location 
>>>>> and then restarted weewx. When I look at Yearly reports for 2022 I only 
>>>>> have data from the month I restarted it (August). But if I look at 
>>>>> monthly 
>>>>> reports for January through July I have data there. Also when I look at 
>>>>> the 
>>>>> current data page and select year data there is nothing from 9/1/21 to 
>>>>> 8/1/22.  
>>>>> Anyway to rebuild that yearly data for 2022?
>>>>>
>>>>

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/55201d37-5783-479d-a66b-081dc3bc91b8n%40googlegroups.com.

Reply via email to