FAQ Migrate my Mysql database to PostgreSQL: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
| Line 1: | Line 1: | ||
[[Category:FAQ EN]] | [[Category:FAQ EN]] | ||
= | = Prerequisite= | ||
Your Dolibarr version must be at least version 2.9.0. | |||
If not, first upgrade your Dolibarr keeping MySql. | |||
=Process= | |||
'''Export Mysql:''' | '''Export Mysql:''' | ||
* | * Go onto page Setup - Tools - Backup. | ||
* | * Choose export method "MySql dump". | ||
* | * Choose export compatibility "POSTGRESQL". | ||
* | * Choose "Compress None" and click on "Build backup". | ||
* | * Go into directory of your Dolibarr data files (directory is defined into "Setup - System information - Dolibarr - All parameters" on line "Root directory for data files"). | ||
* | * Go into subdirectory admin/backup. You will find the dump of database you just build with previous step. | ||
''' | '''Create a PostGreSQL database''' | ||
* | * Create an empty PostGreSQL database | ||
* | * Import the MySql dump file into the new PostgreSql database by this way ... | ||
{{ToComplete}} | {{ToComplete}} | ||
''' | '''Modify you Dolibarr setup file''' | ||
* | * Open with a file editor, the file conf/conf.php that you can find into your Dolibarr root installation. | ||
* | * Modify lines make programs to point to new database | ||
<source lang="ini"> | <source lang="ini"> | ||
$dolibarr_main_db_host=' | $dolibarr_main_db_host='name_or_ip_of_postgresql_server'; | ||
$dolibarr_main_db_port=' | $dolibarr_main_db_port='port_server_postgresql'; | ||
$dolibarr_main_db_name=' | $dolibarr_main_db_name='name_database_postgresql'; | ||
$dolibarr_main_db_user=' | $dolibarr_main_db_user='login_database_mysql'; | ||
$dolibarr_main_db_pass=' | $dolibarr_main_db_pass='password_database_mysql'; | ||
$dolibarr_main_db_type='pgsql'; | $dolibarr_main_db_type='pgsql'; | ||
</source> | </source> | ||
''' | '''Test''' | ||
You should now have an application 100% working with all its data. | |||
Revision as of 10:09, 16 February 2011
Prerequisite
Your Dolibarr version must be at least version 2.9.0. If not, first upgrade your Dolibarr keeping MySql.
Process
Export Mysql:
- Go onto page Setup - Tools - Backup.
- Choose export method "MySql dump".
- Choose export compatibility "POSTGRESQL".
- Choose "Compress None" and click on "Build backup".
- Go into directory of your Dolibarr data files (directory is defined into "Setup - System information - Dolibarr - All parameters" on line "Root directory for data files").
- Go into subdirectory admin/backup. You will find the dump of database you just build with previous step.
Create a PostGreSQL database
- Create an empty PostGreSQL database
- Import the MySql dump file into the new PostgreSql database by this way ...
Modify you Dolibarr setup file
- Open with a file editor, the file conf/conf.php that you can find into your Dolibarr root installation.
- Modify lines make programs to point to new database
$dolibarr_main_db_host='name_or_ip_of_postgresql_server';
$dolibarr_main_db_port='port_server_postgresql';
$dolibarr_main_db_name='name_database_postgresql';
$dolibarr_main_db_user='login_database_mysql';
$dolibarr_main_db_pass='password_database_mysql';
$dolibarr_main_db_type='pgsql';
Test
You should now have an application 100% working with all its data.