It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

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 votes
ThiagoBomfim Atlassian Team Dec 01, 2015

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
Community showcase
Published in Bitbucket

Atlassian supported Jenkins integration for Bitbucket Server

We’ve been building a plugin to integrate Bitbucket Server and Jenkins CI, and I’m excited to announce that our alpha is ready to download and install. It lets you seamlessly configure a Jenkins job ...

1,091 views 3 17
Read article

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you