Moving old data to a new installation

118 views
Skip to first unread message

Francisco Puig

unread,
Jul 22, 2020, 1:18:42 AM7/22/20
to weewx-user
I just finished installing a new server and I want to move the historical data from the old installation to the new installation to avoid missing the historical data. What should be the correct procedure?

Thanks.

gjr80

unread,
Jul 22, 2020, 1:39:44 AM7/22/20
to weewx-user
Hi,

If you were using SQLite as your DBMS then it is just a case of copying your database (.sdb) file from old to new. A default install uses /home/weewx/archive/weewx.sdb or /var/lib/weewx/weewx.sdb depending on your WeeWX install type. If you were using MySQL/Maria and are intending to use the same then you need to export then import your database if MySQL/Maria was run locally. One thing to watch is if moving from 3.x to 4.x be aware that 4.x defaults to the wview_extended schema whereas 3.x used the wview schema. 3.x databases are fully compatible with 4.x, it is just that you may end up with a schema setting in weewx.conf under 4.x that differs to what is in your database, it won't (shouldn't) cause a problem as the weewx.conf schema setting is only used when creating a new database but it is worth being aware of.

Gary

Francisco Puig

unread,
Jul 22, 2020, 8:22:17 AM7/22/20
to weewx-user
Hi Gary,

I'm using the default configuration where the .sdb is on /var/lib/weewx. I copied the .sdb to the new server verified the file permission, restarted the script but the web interface still not showing the historical data not sure if I'm missing something else. Do I have to do something else to get the historical data populated in the web server? I'm using the apache2 with the default configuration. 

gjr80

unread,
Jul 22, 2020, 9:01:48 AM7/22/20
to weewx-user
By restarted the script I presume you meant restarted WeeWX.

the web interface still not showing the historical data

So does that mean that the WeeWX generated web pages are being generated and displaying current data only but nothing historical ie week/month/year aggregates?

What to check/do really depends on what output you are seeing. Plots without historical data indicate that your archive has no historical data which would make me think you have not copied over the database correctly (when checking plots look very carefully, if only one or two points are being plotted it can be very hard to see them and some folks in fact think there plots are blank). If week/month/year aggregates are missing that would indicate an issue with the daily summary tables. The first thing you would do would be to rebuild them using wee_database but there really should be no reason they need rebuilding. If both plots and week/month/year aggregates are missing then that indicates the database has not been properly copied.

If the WeeWX generated pages are not displaying at all that indicates an Apache config issue.

Gary

gjr80

unread,
Jul 22, 2020, 9:04:06 AM7/22/20
to weewx-user
One more thing, have you looked in the logs to make sure that WeeWX is running properly, archive records are being generated and reports being run? If you don't know what to look for restart WeeWX and let it run for a couple of archive periods then post the log from WeeWX startup.

Gary

Francisco Puig

unread,
Jul 22, 2020, 9:13:10 AM7/22/20
to weewx-user
I left weewx running after replaced the .sdb and now I just refreshed the web page again and the old data appears (30 min after), seems like it takes some time to populate. But all historical data is back up. 

Thanks for your help.
Reply all
Reply to author
Forward
0 new messages