Bitbucket startup fails after a DB restore

I am working on a DR backup + restore script to get our BB instance up and running. 

we are using Postgres 


I am backing up my BB db using 

pg_dump bitbucket > bitbucket.dump

restoring it 

pg_restore -v -c -d bitbucket bitbucket.dump

no errors during restore 


Starting BB, it tries to create a table databasechangeloglock  (its already there)

I gave the 'atlbitbucket' user all privileges on teh DB, no idea how to get it to start correctly

Caused by: liquibase.exception.LockException: liquibase.exception.DatabaseException: ERROR: no schema has been selected to create in
Position: 14 [Failed SQL: CREATE TABLE databasechangeloglock (ID INT NOT NULL, LOCKED BOOLEAN NOT NULL, LOCKGRANTED TIMESTAMP WITHOUT TIME ZONE, LOCKEDBY VARCHAR(255), CONSTRAINT PK_DATABASECHANGELOGLOCK PRIMARY KEY (ID))]
at liquibase.lockservice.StandardLockService.acquireLock(StandardLockService.java:242)
at liquibase.lockservice.StandardLockService.waitForLock(StandardLockService.java:170)
at liquibase.Liquibase.update(Liquibase.java:196)
at liquibase.Liquibase.update(Liquibase.java:192)
at liquibase.integration.spring.SpringLiquibase.performUpdate(SpringLiquibase.java:431)
at liquibase.database.ExtendedSpringLiquibase.afterPropertiesSet(ExtendedSpringLiquibase.java:32)
... 5 common frames omitted
Caused by: liquibase.exception.DatabaseException: ERROR: no schema has been selected to create in
Position: 14 [Failed SQL: CREATE TABLE databasechangeloglock (ID INT NOT NULL, LOCKED BOOLEAN NOT NULL, LOCKGRANTED TIMESTAMP WITHOUT TIME ZONE, LOCKEDBY VARCHAR(255), CONSTRAINT PK_DATABASECHANGELOGLOCK PRIMARY KEY (ID))]
at liquibase.executor.jvm.JdbcExecutor$ExecuteStatementCallback.doInStatement(JdbcExecutor.java:309)
at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:55)
at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:113)
at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:103)
at liquibase.lockservice.StandardLockService.init(StandardLockService.java:94)
at liquibase.lockservice.StandardLockService.acquireLock(StandardLockService.java:206)
... 10 common frames omitted



This is what the DB looks like (attached img)cap.GIF

 

 

1 answer

This widget could not be displayed.

BBucket 5.4.0

Postgres: postgresql96-server-9.6.5-1PGDG.rhel6.x86_64

centos 6.8

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Aug 21, 2018 in Bitbucket

Branch Management with Bitbucket

As a project manager, I have discovered that different developers want to bring their previous branching method with them when they join the team. Some developers are used to performing individual wo...

1,230 views 8 11
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you