Missed Team ’24? Catch up on announcements here.

×
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

restore stash

Young__Hahn December 1, 2015

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
Atlassian Team members are employees working across the company in a wide variety of roles.
December 1, 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
TAGS
AUG Leaders

Atlassian Community Events