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

stash-restore-client.jar only restored main branch?

Qiang Zheng December 21, 2017

Hi,

I tried restored production stash (3.1.3) to my stage stash (3.1.3) with stash-backup-client.jar and stash-restore-client.jar from stash-backup-client-1.9.1. It went OK except that all repos only show main branch. Can someone help? Thanks!

Commands I used to restore

java -Djdbc.override=true -Djdbc.driver=com.microsoft.sqlserver.jdbc.SQLServerDriver      -Djdbc.url="jdbc:sqlserver://...;databaseName=..."          -Djdbc.user=...  -Djdbc.password=...         -Dstash.home=...  -jar .../stash-backup-client-1.9.1/stash-restore-client.jar ./stash-20171019-041823-113.tar 

 

1 answer

0 votes
LifeOfAFlippedTable
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 26, 2017

Hey Qiang,

 

This is fairly an odd one. Usually repositories should be intact as long as everything is backed up correctly and that the file is not corrupted. A few things that you can check:

  • Are you backing up and restoring using the same client version (i.e. 1.9.1)? If you're not try, try backing up and restoring using the same client version
  • Have you tried to perform the backup and restore again? Was there any particular error that you could see on the command line while backing up or restoring even if the process is successful?
  • Stash 3.1 is fairly old and it falls under our End Of Life version. Perhaps upgrading your instance and using a later version of the  Backup Client compatible with the version of Bitbucket Server that you are using. This could potentially help solve the problem
  • Lastly, you could also verify if the branches are actually at the present on the bare repositories. Navigate to your $STASH_HOME/data/repositories/{id} from a terminal for both the original instance and the restored instance of on the repositories and perform a {{git branch}} to see if the original instance repository has more than just the {{master}} branch.

 

Best,

Andrew Er 

Qiang Zheng December 28, 2017

Andrew, 

Thanks for your answer. 

. Yes, I used 1.9.1 for both backup and restore. I also made sure backup/restore both ran with jdk1.7.0_141.

. I did backup/restore again. I did not see any errors. It took pretty long time, about 4 hours to restore to my testing instance.

. git command can list various branches, not just master.

. I did not try the new version backup/restore tools. What versions work with both Stash 3.1.3 and Bitbucket? My production was running with Stash 3.1.3. And I cannot upgrade production before I can restore data to my testing server yet.

Thanks again.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events