How can I move taxonomy terms to a different vocabulary and update term reference fields? I need to split a taxonomy vocabulary into two different vocabularies in Drupal 7.

I can use the Taxonomy Manager module to move terms from one vocabulary to another; I have tested this and it works.

However, the big problem is that I have a large number of nodes with a taxonomy term reference field that include references to the terms.

This is what it looks like now:
Nodes of Content Type X have a Taxonomy term reference (multiple values permitted) to Vocabulary A.

This is what I want to do.


Split Vocabulary A into Vocabulary B and Vocabulary A (which contains about half the terms).  [This step can be done with Taxonomy Manager.]
Create a new term reference field to Vocabulary B.  [This can be done from the Field UI.]
Move the term references to terms that are now in Vocabulary B in the Term reference to Vocabulary A to the new term reference for Vocabulary B.  [No idea how to do this except a lot of manual work.]


Any ideas about how to go about step 3?
This tutorial suggests doing it via directly performing SQL queries to change the associated vocabularies for the terms in question.

The term reference fields should be by term ID. The term ID should not be changing, only the vocabulary value associated with the term entity.