>From this recent experience, it appears that the contents of all the fields that exist in both databases are copied across. The older database template that I used to create the initial mariadb database already contained some additional 'special' fields, but I had never altered the default schema file reference in weewx.conf, and still haven't done so. Once I had updated the structure of the mariadb database to include the more recently added fields, running the weectl database transfer resulted in a successful transfer of the contents of *all* the fields from the old sqlite database.
On Saturday, November 22, 2025 at 3:24:37 PM UTC-5 Vince Skahan wrote: > > https://github.com/weewx/weewx/wiki/Transfer%20from%20sqlite%20to%20MySQL#using-wee_database > > seems to indicate that if you are using a user-customized schema it should > work ok if you create a schema file from custom 'from' database and > reference it in your weewx.conf file... > > * It will use the database archive_mysql in the [Databases] section > of weewx.conf, and the wview_extended database schema. If this is not the > case (e.g., you use a modified schema) you will need to alter one of more > of the above settings accordingly.* > > On Saturday, November 22, 2025 at 9:40:07 AM UTC-8 Peter Fletcher wrote: > >> I recently used weectl database transfer to copy the contents of a large >> sqlite weewx database (5 years of data) into a newly created mariadb >> database on a networked server. I had not realized that the template I had >> used to create the mariadb database was for a previous version of the weewx >> database, to which I had subsequently added four new fields. The transfer >> proceeded without errors or problems, and I didn't notice the missing >> fields in the mariadb database until I tried to use a script of my own to >> bring it right up to date. For the weectl utility to handle missing fields >> (on either side) politely is arguably a feature, rather than a bug, but I >> do think that it should issue a warning before starting the transfer if the >> logical structure of the two database tables is not identical. > > -- You received this message because you are subscribed to the Google Groups "weewx-development" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion visit https://groups.google.com/d/msgid/weewx-development/18f8e74a-f5f9-4e8c-a5df-f537c4b07ff2n%40googlegroups.com.
