Hi Team,
I am willing to use backup and restore feature using bitbucket-backup-distribution-3.7.0 client.
I tried passing the appropriate values in the below command and run this.
java -Dbitbucket.password="admin" -Dbitbucket.user="admin" -Dbitbucket.baseUrl="http://localhost:7990" -Dbitbucket.home=path/to/bitbucket/home -Dbackup.home=path/to/backup-home -jar bitbucket-backup-client.jar
However I am getting 403 from the server.
2021-07-02 15:15:25,477 INFO [main] c.a.b.i.b.client.spring.SpringMain Initializing
2021-07-02 15:15:27,704 ERROR [main] c.a.b.i.backup.client.BackupMain A backup could not be created
com.atlassian.bitbucket.internal.backup.client.BackupException: The Bitbucket version could not be verified; the server returned 403 Forbidden. Backup/restore is only supported by Bitbucket 2.7.0 and later.
at com.atlassian.bitbucket.internal.backup.client.RestBitbucketService.handleVersionQueryFailure(RestBitbucketService.groovy:359)
at com.atlassian.bitbucket.internal.backup.client.RestBitbucketService.getVersion(RestBitbucketService.groovy:187)
at com.atlassian.bitbucket.internal.backup.client.DefaultBackupClient.negotiateWithBitbucket(DefaultBackupClient.groovy:111)
at com.atlassian.bitbucket.internal.backup.client.DefaultBackupClient.doBackup(DefaultBackupClient.groovy:45)
at com.atlassian.bitbucket.internal.backup.client.extensions.StopwatchExtension.time(StopwatchExtension.groovy:11)
at com.atlassian.bitbucket.internal.backup.client.DefaultBackupClient.backup(DefaultBackupClient.groovy:39)
at com.atlassian.bitbucket.internal.backup.client.spring.SpringMain.run(SpringMain.groovy:28)
at com.atlassian.bitbucket.internal.backup.client.spring.SpringMain.run(SpringMain.groovy)
at com.atlassian.bitbucket.internal.backup.client.BackupMain.main(BackupMain.groovy:39)
at com.atlassian.bitbucket.internal.backup.client.JavaVersionCheckingShim.invokeClientClassMain(JavaVersionCheckingShim.java:71)
at com.atlassian.bitbucket.internal.backup.client.JavaVersionCheckingShim.run(JavaVersionCheckingShim.java:85)
... 109 frames suppressed
Caused by: org.springframework.web.client.HttpClientErrorException$Forbidden: 403 Forbidden: [<html>
<head><title>403 Forbidden</title></head>
<body>
<center><h1>403 Forbidden</h1></center>
</body>
</html>
]
at org.springframework.web.client.HttpClientErrorException.create(HttpClientErrorException.java:109)
at org.springframework.web.client.DefaultResponseErrorHandler.handleError(DefaultResponseErrorHandler.java:186)
at org.springframework.web.client.DefaultResponseErrorHandler.handleError(DefaultResponseErrorHandler.java:125)
at org.springframework.web.client.ResponseErrorHandler.handleError(ResponseErrorHandler.java:63)
at org.springframework.web.client.RestTemplate.handleResponse(RestTemplate.java:819)
at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:777)
at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:711)
at org.springframework.web.client.RestTemplate.getForObject(RestTemplate.java:334)
at com.atlassian.bitbucket.internal.backup.client.RestBitbucketService.slurp(RestBitbucketService.groovy:291)
... 97 common frames omitted
... 20 frames suppressed
Could you please suggest here.