Saving years of archived weather data before upgrading?

175 views
Skip to first unread message

barry manilow

unread,
Jun 6, 2024, 10:46:05 AM6/6/24
to weewx-user
I've been running Weewx on a Pi for several years, and want to upgrade both Raspbian and Weewx, but keep the stored weather data which is archived on Wunderground.
I've checked the conversations, but can't find anyone who has done this, or even if it's possible.
Curently on Debian 8 (Jessie) and Weewx 4.10 running a Davis Vantage Vue.
I want to upgrade to Weewx 5 and Debian 12 (Bookworm.)
Jessie to Bookworm requires several sequential upgrades, and the recommendation is to do a fresh Bookworm install on a new sd card.
A fresh install of Weewx on Bookworm would start my Davis weather station from scratch, but I'm sure I'd lose the past 6 years of records.
Is there any way to do this?

michael.k...@gmx.at

unread,
Jun 6, 2024, 11:44:32 AM6/6/24
to weewx-user
You are running weewx, so your weather data is stored in a database as configured in weewx.conf. Check you weewx.conf for the settings. If you use sqlite, simply copy the existing database (wewwx.sdb) to your new system and you can seamlessly continue.
I'm sure there are several migration and upgrade guides, anyway, one thing's for sure everything you need to know is in the manual: https://weewx.com/docs

vince

unread,
Jun 6, 2024, 12:00:27 PM6/6/24
to weewx-user
Very straightforward  if you have a second computer or an external disk you can save the current files to.

It's always wise to use a new card for a new major os release.  It's also much (much) faster than trying a not-recommended major version update.

Save the following:
  • your database - you'll put this onto the new system later...
  • your weewx.conf file - for reference, it has the edits you made previously such as your Wunderground credentials
  • your generated NOAA files (optional - but it speeds up first boot at the end)
Then do your new SD card:
  • image the 'new' card with the os
  • boot the pi with the 'new' card, update it to current, and configure it to taste
  • install the webserver of your choice (it it matters, I use nginx but apache or almost anything is ok)
  • install weewx v5 following the instructions in the online docs (link).  Pick the Simulator initially.
  • verify weewx runs ok with the simulator and that you can view your web pages from a browser
  • check your logs to make sure you're not getting any weewx errors
At this point you're running with the simulator so you can switch to the Vantage driver for the Tue
  • stop weewx
  • put your 'saved' database into place, overwriting your new tiny db with the simulator data
  • edit weewx.conf to add in your Wunderground credentials and enable that uploader
  • if you saved your NOAA files, copy them into place in your web output directory (optional)
  • run weectl station reconfigure to switch to the Vantage driver
  • start weewx
  • check your logs for errors
Also - you should likely be saving your database (at a minimum) occasionally to protect against losing data if your SD card fails.  If you're on a typical Vue you have a datalogger of some kind that will keep saving data continually, but it only holds a week or so of records.  Weewx will gracefully process any missing readings if your pi was offline for a while.

The whole process after getting the os installed/booted/upgraded is about 15 minutes max.   If you mess anything else, just reflash the card and try it again as needed.  That's why working off a new card is goodness.  You can always punt and start over as needed.

p q

unread,
Jun 6, 2024, 12:59:52 PM6/6/24
to weewx...@googlegroups.com
I recommend you leave your existing station alone and buy a new Raspberry PI, install everything on the new one and then use the old one for something else. It's not that expensive and it will allow you to mess around with the new system while leaving the old one operational.

--
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+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/5c25f2b5-9b02-4fa7-a95d-81a07fb59123n%40googlegroups.com.


--
Peter Quinn
(415)794-2264

geoff...@gmail.com

unread,
Jun 7, 2024, 8:02:11 AM6/7/24
to weewx-user
Whenever I undertake a major update or upgrade, I set up a test version of weewx on a separate RPi, initially using the Simulator station.  That allows me to verify that all the changes play nicely together, before committing the new system to my live station.  

barry manilow

unread,
Jun 7, 2024, 8:14:15 AM6/7/24
to weewx-user
Thanks for all the ideas, I'll get a new SD card and start anew. Running a Macbook Pro with SD card adapter so should be fine.
I nievely thought the weather data was being sent off and saved in "the cloud" somewhere in the US, hosted by Wunderground! Didn't think my SD card was doing read/write for the past 6 years and all the data was stored on it....we live and learn.
Reply all
Reply to author
Forward
0 new messages