-
Bug
-
Resolution: Done
-
High
-
None
-
None
-
None
-
Severity 2 - Major
-
Summary
When importing a Bamboo Cloud export to a Bamboo Server database, the Cloud export tries to create the table with owner like bamboo_123456. If this user is not set up in the new PostgreSQL database with access to the tables, Bamboo will not function correctly.
Steps to Reproduce
- Follow upgrade steps in Migration Hub
Expected Results
Bamboo is imported and the data is visible in the app
Actual Results
Import completes with errors, and the data is not reachable by Bamboo, causing Bamboo to start a new instance.
The below exception is thrown in the import log file:
ERROR: role "bamboo_123456" does not exist ERROR: role "bamboo_ro_737006_1" does not exist
Workaround
- Run the following command on the dbDump.dmp file before the import:
bambooUser=$(grep "OWNER TO bamboo_" dbDump.dmp | head -1 | sed -re 's/.*(bamboo_[[:digit:]]*).*/\1/') ; sed s/${bambooUser}/bamboo/g dbDump.dmp | grep -v bamboo_ro >dbDumpConverted.dmp
- Import dbDumpConverted.dmp instead of dbDump.dmp:
eg psql -U bamboo -d bamboo < ~/bamboo/database/dbDumpConverted.dmp
If you have already started Bamboo on your previous database dump you will also need to restore your bamboo-home directory from the cloud-export/bamboo-home version to ensure critical upgrade tasks are performed on the new dump you just restored when Bamboo is next started.