We’ve got an old PhPBB3 installation with a lot of posts in it. We’ve made a new installation which already contains new posts. What i want to do, is export the MySQL to XML from the old installation, reset post_id and topic_id to the following number of the new installation.
We will put everything in 1 new category (import, 111).
<column name="post_id">3</column>
<column name="topic_id">3</column>
The new columns are running in 3000, lets say 3337.
So what i need is every line that has
<column name="post_id">3</column>
Needs to get
<column name="post_id">3338</column>
Same goes for topic_id…
How would one do this?
You can do it with Ruby, Python or Perl. Here’s how it’s done in Ruby:
Your
file.xmlwill be edited in-place and the backup copy will be saved tofile.xml.bak.