AsmBB

Power
Login Register

The first attempt to convert phpBB database to AsmBB
0

#15780 (ツ) johnfound
Last edited: 20.03.2019 by johnfound, read: 4565 times

Here is described the first, not finished, semi-automatic method to convert the phpBB database to AsmBB.

Here are the steps:

  1. Dump the mysql database to SQL dump.

  2. Separate the CREATE and INSERT statements in two different .sql files. Remove all other code from the dump. We will not need the indices, triggers and so on.

  3. Convert the file with the database schema (the create statements) into SQLite format. There are some tools available (I will attach some in the post) but they does not work very good. I will attach as well the schema file from the version of phpBB I converted ( phpbb_schema.sql ).

  4. Convert the data dump (insert statements) into SQLite format. Actually for MySQL only the string constants need to be converted, because it uses C style character escapes, but not SQLite. I have written special tool (attached mysql2sqlite.tag.gz ) in order to convert the strings, because the available was not able to make it. The program reads from STDIN and writes to STDOUT. For example:

  5. cat phpbb_insert.sql | ./mysql2sqlite > insert.sql
    
  6. Run so prepared dump files with the console version of sqlite in order to create SQLite database with the structure and data of the converted forum. Something like:

  7. sqlite3 phpbb.sqlite < ./phpbb_schema.sql
    sqlite3 phpbb.sqlite < ./insert.sql
    
  8. The next step is to put the attachments into the database (because phpBB stores them as a files. Execute the script attachments.sql against the database. But first check the paths used inside. In my case, the files are located in ./php_engine/files/ directory.

  9. sqlite3 phpbb.sqlite < attachments.sql
    

    After this step we have an SQLite database phpbb.sqlite with the structure and data of the original phpBB forum.

  10. Install locally AsmBB and run it in order to create new empty AsmBB forum. Create an admin user with name that not exists in the phpBB forum.

  11. put the created phpbb.sqlite database in the same directory where AsmBB is installed.

  12. Open the local AsmBB in a web browser, login as an Admin and open the SQLite console. You must use the SQLite console for the following processing, because AsmBB uses some user SQLite functions that are not available in the other SQLite tools.

  13. Copy the text from the file phpbb.sql into the SQL window and execute it - it should import all data from the phpBB database into the AsmBB database. Check carefully the result messages in order to detect execution errors. It is a good idea to first make a copy of the initial empty AsmBB database in order to have an easy way to undo.

Notice: The script converts the phpBB private messages into an AsmBB "Limited Access Threads" (LAT) but because of the very nature of the private messages, the result is not very good. I am working on a way to make this conversion in a more natural way, but with little success so far.

All the mentioned above files are attached to this post:

Attached files:
FileSizeUploadedDownloadsMD5 hash
attachments.sql263 bytes20.03.2019678e538adb54c85f5377ef82ba271e22976
mysql2sqlite.pl217 bytes20.03.20197131667eb77783094abff7be77d41ffa6e5
mysql2sqlite.sh2962 bytes20.03.2019683cf13ee59dd3bf47cb687c9e528d5cb6a
mysql2sqlite.tar.gz2806 bytes20.03.2019767b9f0dc6a9bb83ea2cf797f25167d8ae4
phpbb.sql17002 bytes20.03.201951119205b715ea3dd2e4a37db5758ef31fc
phpbb_schema.sql18598 bytes20.03.20196886876cc9a34a1e85a54fd20068d1d0462
#15947 (ツ) nasimnzp
Created 26.08.2019, read: 3957 times

The first attempt to convert phpBB database to AsmBB
0

AsmBB v3.0 (check-in: a316dab8b98d07d9); SQLite v3.42.0 (check-in: 831d0fb2836b71c9);
©2016..2023 John Found; Licensed under EUPL. Powered by Assembly language Created with Fresh IDE