Uploaded image for project: 'Bamboo Data Center'
  1. Bamboo Data Center
  2. BAM-18060

Cloud export contains table owner like bamboo_[numbers] making Bamboo tables inaccessible after import

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: High High
    • None
    • None
    • None

      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

      1. 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

      1. 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
        
      2. 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.

              Unassigned Unassigned
              ezeidan Ellie Z (they/them)
              Votes:
              1 Vote for this issue
              Watchers:
              7 Start watching this issue

                Created:
                Updated:
                Resolved: