restore stash

Hi

I am currently working on creating new server for stash/Bitbucket.. 

I am going to use new server, new DB and new URL with new ports.. 

 

 I was able to use backup client to do the backup 

and got the file 

backup-admin-20151201-144307-771Z.zip

 

I ran the command in new server to restore 

java -jar bitbucket-restore-client.jar backup-admin-20151201-144307-771Z.zip

 

and yes I did configure the 

backup-config.properties with STASH-HOME directory and JDBC information.. 

 

however, I am keep getting error and cannot run the restore.. 

2015-12-01 11:04:15,897 INFO         Initializing

2015-12-01 11:04:16,414 WARN         Exception encountered during context initialization - cancelling refresh attempt

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.context.support.PropertySourcesPlaceholderConfigurer#0' defined in class path resource [META-INF/spring/restore-spring.xml]: Cannot create inner bean 'com.atlassian.bitbucket.internal.backup.client.spring.env.FlatteningPropertySources#77102b91' of type [com.atlassian.bitbucket.internal.backup.client.spring.env.FlatteningPropertySources] while setting bean property 'propertySources'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.atlassian.bitbucket.internal.backup.client.spring.env.FlatteningPropertySources#77102b91' defined in class path resource [META-INF/spring/restore-spring.xml]: Cannot create inner bean 'sharedHomePropertySource' of type [com.atlassian.bitbucket.internal.backup.client.spring.env.SharedHomePropertySource] while setting constructor argument with key [0]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sharedHomePropertySource' defined in class path resource [META-INF/spring/restore-spring.xml]: Cannot resolve reference to bean 'sharedHomeLocator' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'restoreConfig' defined in class path resource [META-INF/spring/restore-spring.xml]: Invocation of init method failed; nested exception is com.atlassian.bitbucket.internal.backup.client.RestoreException: Unable to extract the backup metadata from /data/bitbucket-backup-client-2.0.1/temp/active-objects-data.xml

 at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:313) ~[spring-beans-4.1.7.RELEASE.jar:4.1.7.RELEASE]

 at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:122) ~[spring-beans-4.1.7.RELEASE.jar:4.1.7.RELEASE]

 ... 14 more frames available in the log file

2015-12-01 11:04:16,527 ERROR        The application could not be started. An unexpected error prevented the Spring

ApplicationContext from being created. Details of the error follow.

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.context.support.PropertySourcesPlaceholderConfigurer#0' defined in class path resource [META-INF/spring/restore-spring.xml]: Cannot create inner bean 'com.atlassian.bitbucket.internal.backup.client.spring.env.FlatteningPropertySources#77102b91' of type [com.atlassian.bitbucket.internal.backup.client.spring.env.FlatteningPropertySources] while setting bean property 'propertySources'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.atlassian.bitbucket.internal.backup.client.spring.env.FlatteningPropertySources#77102b91' defined in class path resource [META-INF/spring/restore-spring.xml]: Cannot create inner bean 'sharedHomePropertySource' of type [com.atlassian.bitbucket.internal.backup.client.spring.env.SharedHomePropertySource] while setting constructor argument with key [0]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sharedHomePropertySource' defined in class path resource [META-INF/spring/restore-spring.xml]: Cannot resolve reference to bean 'sharedHomeLocator' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'restoreConfig' defined in class path resource [META-INF/spring/restore-spring.xml]: Invocation of init method failed; nested exception is com.atlassian.bitbucket.internal.backup.client.RestoreException: Unable to extract the backup metadata from /data/bitbucket-backup-client-2.0.1/temp/active-objects-data.xml

 at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:313) ~[spring-beans-4.1.7.RELEASE.jar:4.1.7.RELEASE]

 at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:122) ~[spring-beans-4.1.7.RELEASE.jar:4.1.7.RELEASE]

 ... 14 more frames available in the log file

 

 

I did some googling..

https://confluence.atlassian.com/display/BitbucketServerKB/Restore+fails+with+unable+to+extract+backup+metadata+error

According to above website.. 

my backup file name is wrong.. 

but I have no idea what it should be.. 

 

I even unzip the zip file and tried each files.. but didnt work.. 

 

 

can someone help me how to restore the data? 

1 answer

0 vote

Hi Young,

As specified in the article:

(...) the right file to be restored namely stash-YYYYMMDD-HHMMSS-ID.tar should be inside the <backup-tool>/backups directory.

Have you checked for the file within the backup tool directory?

Note that the article also mentions that you could have specified a different location for the backups to be stored.

Best,
Thiago

 

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted Jun 06, 2018 in Bitbucket

Do you use Bitbucket Cloud and Jira Cloud? If so, let us know!

Hi Community, I'm Julia and I'm on the Jira Software Cloud marketing team!  We're looking for companies or teams using Bitbucket Cloud and Jira Software Cloud. If your team fits the t...

96 views 4 3
Join discussion

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