This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
wiki:migration_from_a_mysql_to_a_postgresql_database [2015/09/23 17:06] – [New procedure] neyron | wiki:migration_from_a_mysql_to_a_postgresql_database [2015/09/23 17:11] (current) – [New procedure] neyron | ||
---|---|---|---|
Line 6: | Line 6: | ||
See: https:// | See: https:// | ||
- | |||
- | Once the postgresql database engine is setup, oar database created with the oar user (using the oar-database tool), one can use the oar-database-migrate tools, as follows: | ||
Installation of oar-cli which provides oar-database-migrate: | Installation of oar-cli which provides oar-database-migrate: | ||
Line 29: | Line 27: | ||
Run the migration | Run the migration | ||
< | < | ||
- | oar-database-migrate --current-db-url mysql://oarreader:PASSWORD@.../oar --new-db-url postgresql:// | + | oar-database-migrate --current-db-url mysql://oar_ro:PASSWORD@mysql_server/oar --new-db-url postgresql:// |
</ | </ | ||
- | Fix the rights of the oar database users (oar and oarreader | + | Fix the rights of the oar database users (oar and oar_ro |
< | < | ||
$ psql oar2 | $ psql oar2 | ||
Line 54: | Line 52: | ||
job_state_logs_job_state_log_id_seq, | job_state_logs_job_state_log_id_seq, | ||
moldable_job_descriptions_moldable_id_seq, | moldable_job_descriptions_moldable_id_seq, | ||
- | resources_resource_id_seq, | + | resources_resource_id_seq, |
</ | </ | ||