I guess "weectl database reconfigure --binding=wx_binding -y" will do this job.
But "weectl database reconfigure --binding=wx_binding --dry-run -y" fails:
Using configuration file /home/weewx/weewx-data/weewx.conf
This is a dry run. Nothing will actually be done.
Copying database 'weewx' to 'weewx_new'
The new database will use the same unit system as the old ('METRICWX').
Traceback (most recent call last):
File "/home/weewx/weewx-venv/bin/weectl", line 7, in <module>
sys.exit(main())
~~~~^^
File "/home/weewx/weewx-venv/lib/python3.13/site-packages/weectl.py", line 67, in main
namespace.func(namespace)
~~~~~~~~~~~~~~^^^^^^^^^^^
File "/home/weewx/weewx-venv/lib/python3.13/site-packages/weectllib/__init__.py", line 90, in dispatch
namespace.action_func(config_dict, namespace)
~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/weewx/weewx-venv/lib/python3.13/site-packages/weectllib/database_cmd.py", line 371, in reconfigure_database
weectllib.database_actions.reconfigure_database(config_dict,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
db_binding=namespace.binding,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
dry_run=namespace.dry_run,
^^^^^^^^^^^^^^^^^^^^^^^^^^
no_confirm=namespace.yes)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/weewx/weewx-venv/lib/python3.13/site-packages/weectllib/database_actions.py", line 295, in reconfigure_database
weewx.manager.reconfig(manager_dict['database_dict'],
~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
new_database_dict,
^^^^^^^^^^^^^^^^^^
new_unit_system=target_unit_system,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
new_schema=manager_dict['schema'],
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
dry_run=dry_run)
^^^^^^^^^^^^^^^^
File "/home/weewx/weewx-venv/lib/python3.13/site-packages/weewx/manager.py", line 711, in reconfig
record_generator = weewx.units.GenWithConvert(old_archive.genBatchRecords(),
^^^^^
UnboundLocalError: cannot access local variable 'weewx' where it is not associated with a value