On Sunday, September 1, 2024 at 5:51:40 PM UTC-6 matthew wall wrote:
[...] do something like this (NOT TESTED!!!): # stop weewx sudo launchctl unload /Library/LaunchDaemons/com.weewx.plist # make a copy of the old database and the active database cp /Users/shared/weewx/archive/weewx.sdb weewx1.sdb cp ~/weewx-data/archive/weewx.sdb weewx2.sdb # move aside the active database mv ~/weewx-data/archive/weewx.sdb ~/weewx-data/archive/weewx.sdb-YYmmdd # copy new data into the copy of the old database sqlite3 weewx1.sdb sqlite> attach database 'weewx2.sdb' as 'weewx2'; sqlite> insert into weewx1.archive select * from weewx2.archive; # rebuild the daily summaries weectl database rebuild-daily # move the newly modified database into place cp weewx1.sdb ~/weewx-data/archive/weewx.sdb # start weewx sudo launchctl load /Library/LaunchDaemons/com.weewx.plist # clean up rm weewx1.sdb weewx2.sdb Thanks! You've put me on the right path. My remaining issue is that my old weewx.sdb and current weewx.sdb overlap in time, as expected, so insertion fails. Once I figure out the appropriate syntax for SQL I'll strip one or the other of the appropriate piece and reassemble. If only these were netCDF files I'd be done in about two seconds... -- 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/3e6ecb0f-e4fd-4982-a041-ab20b27bf8f4n%40googlegroups.com.
