This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
wiki:migration_from_a_mysql_to_a_postgresql_database [2015/09/23 17:06]
neyron [New procedure]
wiki:migration_from_a_mysql_to_a_postgresql_database [2015/09/23 17:11]
neyron [New procedure]
Line 6: Line 6:
 See: https://​github.com/​oar-team/​python-oar-cli See: https://​github.com/​oar-team/​python-oar-cli
-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
 <​code>​ <​code>​
-oar-database-migrate --current-db-url mysql://oarreader:PASSWORD@.../oar --new-db-url postgresql://​oar:​PASSWORD@/​...+oar-database-migrate --current-db-url mysql://oar_ro:PASSWORD@mysql_server/oar --new-db-url postgresql://​oar:​PASSWORD@/​pgsql_server
 </​code>​ </​code>​
-Fix the rights of the oar database users (oar and oarreader ​in this example):+Fix the rights of the oar database users (oar and oar_ro ​in this example):
 <​code>​ <​code>​
 $ psql oar2 $ psql oar2
Line 54: Line 52:
   job_state_logs_job_state_log_id_seq,​job_types_job_type_id_seq,​   job_state_logs_job_state_log_id_seq,​job_types_job_type_id_seq,​
   moldable_job_descriptions_moldable_id_seq,​resource_logs_resource_log_id_seq,​   moldable_job_descriptions_moldable_id_seq,​resource_logs_resource_log_id_seq,​
-  resources_resource_id_seq,​jobs_job_id_seq TO oarreader;+  resources_resource_id_seq,​jobs_job_id_seq TO oar_ro;
 </​code>​ </​code>​
wiki/migration_from_a_mysql_to_a_postgresql_database.txt ยท Last modified: 2015/09/23 17:11 by neyron
Recent changes RSS feed GNU Free Documentation License 1.3 Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki