This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | Next revisionBoth sides next revision | ||
wiki:migration_from_a_mysql_to_a_postgresql_database [2015/09/23 14:59] – [New procedure] neyron | wiki:migration_from_a_mysql_to_a_postgresql_database [2015/09/23 15:01] – [New procedure] neyron | ||
---|---|---|---|
Line 8: | Line 8: | ||
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: | 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: | ||
<code bash> | <code bash> | ||
Line 14: | Line 16: | ||
$ sudo apt-get install python-mysqldb | $ sudo apt-get install python-mysqldb | ||
$ sudo pip install oar-cli | $ sudo pip install oar-cli | ||
+ | </ | ||
+ | |||
+ | Creation of the new OAR database (in postgresql) + oar database user | ||
+ | < | ||
+ | $ sudo oar-database --create --db-is-localuser | ||
+ | $ sudo su - postgres | ||
+ | $ dropdb oar | ||
+ | $createdb oar -O oar | ||
+ | $exit | ||
</ | </ | ||