Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to move a TBro instance #46

Open
nterhoeven opened this issue Mar 16, 2017 · 3 comments
Open

How to move a TBro instance #46

nterhoeven opened this issue Mar 16, 2017 · 3 comments

Comments

@nterhoeven
Copy link

Is there a recommended way to move a running TBro instance to a different server while keeping all data?

@iimog
Copy link
Member

iimog commented Mar 16, 2017

Unfortunately TBro itself provides no utility functions to aid in this process. However there might be native docker solutions available.

In general what you need in order to replicate your instance somewhere else is:

  • A dump of the chado database (use pg_dump)
  • A dump of the worker database (use pg_dump)
  • The zip files from the ftp server
    After that you make a fresh install of TBro as documented on the new host.
    Then import the database dumps in the respective databases (Use dropdb and createdb first to avoid conflicts) and upload the zip files to the new ftp container.
    The TBro_official container additionally needs a mapping of cvterms in php which is created during installation. After applying your database dumps this mapping might have changed. In order to calculate this new execute those commands inside the TBro_official container:
cd /home/tbro
source ~/.bash_profile
phing database-initialize
cp /etc/tbro/cvterms.php.generated /etc/tbro/cvterms.php

@iimog
Copy link
Member

iimog commented Mar 16, 2017

I agree that there should be a recommended and documented way.

@nterhoeven
Copy link
Author

I just moved a TBro instance and noticed a few things, I want to add to the explanation above:

  • The dropdb and createdb commands should be run from inside the TBro_official container:
dropdb -U tbro -h CHADO chado
createdb -U tbro -h CHADO chado
dropdb -U worker -h WORKER worker
createdb -U worker -h WORKER worker
  • The databases can be imported with
xzcat db-dump.xz | psql -U tbro -h CHADO -d chado
xzcat worker-db-dump.xz | psql -U worker -h WORKER -d worker
  • The phing command did not work at first. I noticed that the hosts for the databases are hardcoded IPs in the build.properties file. This can be fixed by changing chado_db_host and queue_db_host in /home/tbro/build.properties to CHADO and WORKER

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants