Open nterhoeven opened 7 years ago
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:
pg_dump
)pg_dump
)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
I agree that there should be a recommended and documented way.
I just moved a TBro instance and noticed a few things, I want to add to the explanation above:
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
xzcat db-dump.xz | psql -U tbro -h CHADO -d chado
xzcat worker-db-dump.xz | psql -U worker -h WORKER -d worker
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
Is there a recommended way to move a running TBro instance to a different server while keeping all data?