Site: Red Hat Club Forum
URL: http://forum.redhat-club.org/
Language: Russian

I successfully migrated the PunBB 1.3.4 database from MySQL to PostgreSQL on CentOS 5.

Software versions:

  • PunBB: 1.3.4

  • MySQL: 5.0.77

  • PostgreSQL: 8.1.18

  • PHP: 5.1.6

To perform migration, follow these steps:
1. Uninstall all PunBB extensions.

2. Create a dump of the MySQL database:

mysqldump forum --compatible=postgresql --default-character-set=utf8 --skip-extended-insert -u root -p > forum_old.sql

3. Extract only the tables data from the dump, not the schema:

grep "INSERT INTO" forum_old.sql > forum_old_converted.sql

4. Create a PostgreSQL user and the new database:

postgres=# CREATE USER "forum" with password 'super_password';
postgres=# CREATE DATABASE "forum" ENCODING 'UTF-8' OWNER "forum";

5. Remove config.php from the site DocumentRoot.

6. Create PostgreSQL database tables: run install.php from the forum admin directory and follow the instructions.

7. Upload config.php to the site DocumentRoot.

8. Create the dump of the PostgreSQL database schema without the data:

pg_dump forum --create --schema-only -U user_name -h 127.0.0.1 > forum_new_schema.sql;

9. Recreate the PostgreSQL database without the tables data:

postgres=# DROP DATABASE "forum";
psql forum -U user_name -h 127.0.0.1 < forum_new_schema.sql;

10. Import the old MySQL database into the new PostgreSQL database:

psql forum -U user_name -h 127.0.0.1 < forum_old_converted.sql;

11. Update PostgreSQL sequence objects:

SELECT pg_catalog.setval('bans_id_seq', (SELECT MAX(id) FROM bans), true);
SELECT pg_catalog.setval('categories_id_seq', (SELECT MAX(id) FROM categories), true);
SELECT pg_catalog.setval('censoring_id_seq', (SELECT MAX(id) FROM censoring), true);
SELECT pg_catalog.setval('forums_id_seq', (SELECT MAX(id) FROM forums), true);
SELECT pg_catalog.setval('groups_g_id_seq', (SELECT MAX(g_id) FROM groups), true);
SELECT pg_catalog.setval('posts_id_seq', (SELECT MAX(id) FROM posts), true);
SELECT pg_catalog.setval('ranks_id_seq', (SELECT MAX(id) FROM ranks), true);
SELECT pg_catalog.setval('reports_id_seq', (SELECT MAX(id) FROM reports), true);
SELECT pg_catalog.setval('search_words_id_seq', (SELECT MAX(id) FROM search_words), true);
SELECT pg_catalog.setval('topics_id_seq', (SELECT MAX(id) FROM topics), true);
SELECT pg_catalog.setval('users_id_seq', (SELECT MAX(id) FROM users), true);

12. Install necessary PunBB extensions.

Original HOWTO

8k84 wrote:

a) why don't you translate those phrases yourself?

I fixed it but I have no time for testing russian langpack after each minor forum update.
And it was big surprise for me what punbb stop working correctly without some untranslated phrases in langpack.

Russian langpack for PunBB 1.3 is expired (url: http://punbb.informer.com/wiki/_media/p … sian.zip).
PunBB 1.3.3 with russian langpack works incorrectly because russian translation doesn't include next phrases:
* Forum perms redirect info
* Copyright message
* Official extensions inst
* Guests online
* Users online
* Invalid language
* Default language
* Default language help
* E-mail updated redirect
* Search in
* Message and subject
* Message only
* Topic only
* Posted in
* Topic closed info
and some components in html forms is *empty*.

I think is better to show original english text for some phrases if translation is absent for them.