Page tree

Welcome to FreeSoftwareServers Confluence Wiki

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Current »

https://docs.openproject.org/installation-and-operations/misc/packaged-postgresql-migration/

wget -qO- https://dl.packager.io/srv/opf/pgloader-ccl/key | sudo apt-key add -
sudo wget -O /etc/apt/sources.list.d/pgloader-ccl.list \
  https://dl.packager.io/srv/opf/pgloader-ccl/master/installer/ubuntu/18.04.repo
sudo apt-get update
sudo apt-get install pgloader-ccl

Setup DB:

apt-get install -y postgresql postgresql-contrib libpq-dev
su - postgres
createuser -P -d openproject
createdb -O openproject openproject
exit

DB URL Setup:

openproject config:set MYSQL_DATABASE_URL="$(openproject config:get DATABASE_URL)"
openproject config:get MYSQL_DATABASE_URL
openproject config:set DATABASE_URL="postgresql://openproject:openproject@localhost/openproject" #My need to be URL Encoded
openproject config:get DATABASE_URL

#URL Encode

openproject run ruby -r cgi -e "puts CGI.escape('your-password-here');"

Migration:

sudo openproject run /opt/openproject/docker/mysql-to-postgres/bin/migrate-mysql-to-postgres

Remove Old MySQL:

apt-get remove mysql-server
openproject config:unset MYSQL_DATABASE_URL

ReConfigure:

openproject reconfigure
  • No labels