Hi,
i want to move our greate mantis-system from Server A (running mantis 0.19.3/mySQL) to a new Server B. There are approximately 1700 bugs in the Database.
On Server B is an existing postgreSQL-Database, so i want to use this one for the new mantis system.
How can i do this migration? I think 0.19.3 to 1.0.0rc3 is easy, but how should i switch the Database-Systems? What steps do you suggest for the migration??
Many many thanx for your help and greatings from Aachen/Germany!
Tosk
PS: Systems: Linux/Apache, and i could be "root" on both Servers. ;-)
Migration: 0.19.3/mySQL -> 1.0.0rc3/postgreSQL
Moderators: Developer, Contributor
-
Guest
Hi Tosk,
i have done this task almost, but i get stucked in some problems.
I did a migration from 1.0.0rc1 (MySql) to 1.0.0rc4 (PgSql)
That's what i've done so far:
- Create a clean install off mantis on your webserver
- Let Mantis populate your pgsql database
- Maybe your migrate to 1.0.0rc4 first (changed db structure!)
- Dump your MySql database eg:
- edit db_mantis.sql:
comment all entries of mantis_upgrade_table and mantis_config_table
comment "administrator" in mantis_user_table, he's already created
look for correct date format ( wrong: "0000-00-00 00:00:00", correct: "1970-01-01 00:00:00")
set the correct encoding: older versions of mysql dumps the data in LATIN1 newer ones as UTF8 (put in the very first line of your script)
- now import your data into PgSql:
- no errors should be displayed
- all data is migrated
- but ....
Here are my problems:
- Uploaded files (stored in the db) are corrupted (incomp: export/import)
- if i add new bugs there some errors about "duplicate key"....
can anyone help? (Thanks!)
Hints:
if you use UTF8 as standard encoding in your database, you need to tell pgsql to represent the data (for mantis) as LATIN1 (set names 'LATIN1', see also http://manual.mantisbt.org/manual.confi ... tabase.php)
PS: I am not a db specialist, maybe there is better way to perform this task. Any suggestions are welcome :-)
i have done this task almost, but i get stucked in some problems.
I did a migration from 1.0.0rc1 (MySql) to 1.0.0rc4 (PgSql)
That's what i've done so far:
- Create a clean install off mantis on your webserver
- Let Mantis populate your pgsql database
- Maybe your migrate to 1.0.0rc4 first (changed db structure!)
- Dump your MySql database eg:
Code: Select all
mysqldump -n -t --databases your_db -u your_user --password=your_secret >db_mantis.sqlcomment all entries of mantis_upgrade_table and mantis_config_table
comment "administrator" in mantis_user_table, he's already created
look for correct date format ( wrong: "0000-00-00 00:00:00", correct: "1970-01-01 00:00:00")
set the correct encoding: older versions of mysql dumps the data in LATIN1 newer ones as UTF8 (put
Code: Select all
\encoding LATIN1- now import your data into PgSql:
Code: Select all
psql -U your_user -d your_db -f db_mantis.sql- all data is migrated
- but ....
Here are my problems:
- Uploaded files (stored in the db) are corrupted (incomp: export/import)
- if i add new bugs there some errors about "duplicate key"....
can anyone help? (Thanks!)
Hints:
if you use UTF8 as standard encoding in your database, you need to tell pgsql to represent the data (for mantis) as LATIN1 (set names 'LATIN1', see also http://manual.mantisbt.org/manual.confi ... tabase.php)
PS: I am not a db specialist, maybe there is better way to perform this task. Any suggestions are welcome :-)
-
Guest
I wrote some code once that used ADODB to basically connect to one server, grab a few lines from a table, connect to the other server and dump them.
That way, in theory, I had no problems as ADODB did the translations for me. At the time, however, I was only ever able to check this with MySQL. If anyone thinks it's possible, I will try and find a spot to put this code and that might help.
That is, assuming I can find it again :)
That way, in theory, I had no problems as ADODB did the translations for me. At the time, however, I was only ever able to check this with MySQL. If anyone thinks it's possible, I will try and find a spot to put this code and that might help.
That is, assuming I can find it again :)
I've a couple of recommendations for this migration process:
- Upgrade to the latest Mantis version on MySQL before doing the migration to PgSQL, do not move from Mantis version A on MySQL to Mantis version B on PgSQL.
- It is recommended to have your attachments outside the database. If you already have them in the database, then you can use the system utility in the admin/ folder to extract them from the database and put them on disk.
I haven't really done any work on PgSQL, so I can't help with the exact steps.
Regards,
Victor
MantisConnect
http://www.futureware.biz/mantisconnect/
- Upgrade to the latest Mantis version on MySQL before doing the migration to PgSQL, do not move from Mantis version A on MySQL to Mantis version B on PgSQL.
- It is recommended to have your attachments outside the database. If you already have them in the database, then you can use the system utility in the admin/ folder to extract them from the database and put them on disk.
I haven't really done any work on PgSQL, so I can't help with the exact steps.
Regards,
Victor
MantisConnect
http://www.futureware.biz/mantisconnect/