Thanks to everyone for the help.
I ended up deleting the new weewx.sdb file and replacing it with the backup.
Turns out my backup data goes back further than I remembered, right back to 
May 2014.
Anyway it worked, the system took a long time to rebuild the summaries but 
it got there with no errors, and I'm happy. The memory in the Davis logger 
took care of the data for the few days since I rebuilt the system, so all 
is good.

On Monday, 13 January 2020 20:13:24 UTC-4, p q wrote:
>
> Yes, I'm pretty sure if you copied the old database file in place of the 
> new one it would start adding to it. I would for sure keep a backup of the 
> file before doing so.
>
> On Mon, Jan 13, 2020 at 3:54 PM Derek Hodge <[email protected] 
> <javascript:>> wrote:
>
>> Thanks for the quick reply. I think I understand what you're saying, but 
>> I've no idea how to do this in practice.
>> I know I have a lot to learn about all this stuff, but at my time of life 
>> it doesn't get any easier. I can manage simple Linux or Python stuff, but 
>> I'm really in the dark when it comes to databases.
>>
>> I only have a few days of new data. If I just deleted the new weewx.sdb 
>> (in /var/lib/weewx) and replaced it with the old one, would that work if I 
>> accept the loss of the last few days. The original Weewx was v2.6 , would 
>> the format of the old file be the same as required by the latest version of 
>> Weewx? 
>>
>> On Monday, 13 January 2020 17:58:48 UTC-4, vince wrote:
>>>
>>> On Monday, January 13, 2020 at 1:40:47 PM UTC-8, Derek Hodge wrote:
>>>
>>>> The new system is running fine and storing data in weewx.sdb
>>>>
>>>> I have a copy of the old weewx.sdb file with almost 3 years of data 
>>>> (103 MB).
>>>>
>>>> My question is:-
>>>>
>>>> What's the easiest way for a database novice to join these two files, 
>>>> so that I can display all the data I have? There will be a few weeks gap 
>>>> where I was rebuilding the system but that's OK.
>>>> Also will stats.sdb automatically regenerate after the databases are 
>>>> joined?
>>>>
>>>>
>>>>
>>> Personally I'd do the following....
>>>
>>>    - run a sqlite3 dump on the old file to an output file
>>>    - restore that file into your new database, it should do the right 
>>>    thing
>>>
>>> (working off copies of all files of course)
>>>
>>>
>>> -- 
>> 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] <javascript:>.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/weewx-user/432a5068-8d95-4c50-b474-30a7c377768f%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/weewx-user/432a5068-8d95-4c50-b474-30a7c377768f%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>
>
> -- 
> Peter Quinn
> (415)794-2264
>

-- 
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/9dfb3927-ff5c-4c0b-9e53-ebc5ed07b431%40googlegroups.com.

Reply via email to