Weewx Database moved but not showing historical data

141 views
Skip to first unread message

Jim Wilkerson

unread,
Jan 20, 2026, 12:34:42 AMJan 20
to weewx-user
I recent had an event where I needed to move my weewx database to a different drive. 

I had first started the backup system, which had not been up since about May 2023.

Once I copied the database over to the new location and restarted weewx, all starts but when I look in the web UI the Monthly Reports show no data from 28 May 2023 (the last time the system was apparently up, until 25 Nov 2025/

How can I list the database records to make sure they are intact, then get the historical data to be viewable once more on the Web UI reports?

Weewx version 5.2.0
openSUSE LEAP 15.6

<code>
# weectl database check
Using configuration file /etc/weewx/weewx.conf
Checking daily summary tables version...
Daily summary tables are at version 4.0.
Interval Weighting Fix is not required.</code>

Tom Keffer

unread,
Jan 20, 2026, 4:22:24 PMJan 20
to weewx...@googlegroups.com
Not a lot of information here, but assuming you're running the Seasons report, and assuming that by "Monthly report" you mean the NOAA reports, one thing you could try is deleting all of the generated files and let WeeWX recreate them. This will ensure that what you're seeing is what is truly in the database.

As for seeing what records are in the database, that could be a very long list indeed --- perhaps hundreds of thousands or even millions of records. For a shorter summar, you could ask it for which months it has any record at all. Assuming that you are using SQLite and that you have the tool "sqlite3" installed, use it to look inside the database. Assuming that you did a package install (not pip), then this would look like:

sqlite3 /var/lib/weewx/weewx.sdb
sqlite> select distinct strftime("%Y-%m",dateTime,'unixepoch','localtime') from archive;
sqlite> .quit

Depending on how long you've been using your database, this could a hundred lines or so.

If you want even finer detail and wish to see which days have data, you could do

sqlite> select distinct date(dateTime,'unixepoch','localtime') from archive;

But be prepared, this could list thousands of lines.

I've made a lot of assumptions above. If any are wrong come back with more information.

-tk

--
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 visit https://groups.google.com/d/msgid/weewx-user/4d2b261f-4c39-428f-92f4-4b804e9562cfn%40googlegroups.com.

Jim Wilkerson

unread,
Jan 21, 2026, 12:27:56 AM (14 days ago) Jan 21
to weewx-user
Hi, thanks for the tip.

I removed the old reports in

/var/www/html/weewx

Reinstalled 5.2.0  (openSUSE 15.6 repos)

Noticed that my weewx.conf was still

# Do not modify this. It is used when installing and updating weewx.
version = 4.10.2

Fixed that with the new weewx.conf from the 5.2.0 install

# This configuration file was created by ...
version = 5.2.0

As per


I set the skins to the absolute path on my system

[StdReport]
   
    # Where the skins reside, relative to WEEWX_ROOT
    SKIN_ROOT = /usr/share/weewx/weewx_data/skins
   
    # Where the generated reports should go, relative to WEEWX_ROOT
    HTML_ROOT = /var/www/html/weewx

The web page runs again (also had an Apache issue to resolve) but the Monthly reports still show the gaps as prevoius, example:

MONTHLY CLIMATOLOGICAL SUMMARY for Nov 2025 NAME: Cary, NC USA ELEV: 348 feet LAT: 35-47.90 N LONG: 078-50.46 W TEMPERATURE (F), RAIN (in), WIND SPEED (mph) HEAT COOL AVG MEAN DEG DEG WIND DOM DAY TEMP HIGH TIME LOW TIME DAYS DAYS RAIN SPEED HIGH TIME DIR --------------------------------------------------------------------------------------- 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 42.6 52.1 14:30 32.9 00:00 22.4 0.0 0.00 0.9 15.0 16:30 338 28 36.7 46.2 14:00 28.8 07:30 28.3 0.0 0.00 0.9 18.0 10:30 329 29 34.9 45.5 14:00 23.9 07:00 30.1 0.0 0.00 0.3 9.0 10:30 98 30 44.9 54.9 13:00 36.8 02:00 20.1 0.0 0.25 0.1 7.0 14:00 304 --------------------------------------------------------------------------------------- 39.3 54.9 30 23.9 29 100.8 0.0 0.25 0.5 18.0 28 338

That data had been showing on the other system (which was mostly a mirror as this one)

One thing I do notice though is before I was only seeing Monthly Data up to May 2023, now I see it 27 Dec 2024.

I working on learning the sqlite syntax.... I assume the above command is a generic example...

Jim Wilkerson

unread,
Jan 22, 2026, 10:55:58 PM (12 days ago) Jan 22
to weewx-user
Well, now I have managed to make my database read-only:

Jan 22 22:54:02 linux-3wjh weewxd[7035]: ERROR weewx.manager: Unable to add record 2026-01-22 13:00:00 EST (1769104800)>

Can I use the weectl database command to fix this?

Jim Wilkerson

unread,
Jan 22, 2026, 11:01:07 PM (12 days ago) Jan 22
to weewx-user
Oh....

The database was root:weewx

chown  weewx:weewx   fixed that part.

Jim Wilkerson

unread,
Jan 23, 2026, 10:43:27 PM (11 days ago) Jan 23
to weewx-user
Is there a way I can download the data in my Meteobridge NanoSD into the weewx.sdb which would hopefully restore the missing records?  I think I did this once before from my previous Davis data logger...

Jim Wilkerson

unread,
Jan 24, 2026, 11:21:20 PM (10 days ago) Jan 24
to weewx-user
For the record:

From Meteobridge -> Database -> Administration -> Import/Export

From there I exported the records needed into a text file.

Now the last question, what I see for colume headings in the Web UI:

TEMPERATURE (F), RAIN (in), WIND SPEED (mph) HEAT COOL AVG MEAN DEG DEG WIND DOM DAY TEMP HIGH TIME LOW TIME DAYS DAYS RAIN SPEED HIGH TIME DIR ---------------------------------------------------------------------------------------
The exported data:

Temperature in F, Rain in INCH, Wind Spped in MPH, Pressure in INHG
AVG AVG DOM DAY TEMP HIGH TIME LOW TIME RAIN WIND HIGH TIME DIR BAROM HUM ---------------------------------------------------------------------------------------
I understand that the Heat & Cool Deg days are a calculation from the Avg Temp and 65, would these values get recalculated when I bring up the reports on the WebUI?

Or would this be an application of

weectl database calc-missing

for the date range I need?
Reply all
Reply to author
Forward
0 new messages