I have a 25GB "bitbucket-20180628-170624-645.tar.gz" bitbucket backup that I am trying to restore.
Inside the backup I see a ".version" file with these contents,
#Tue Dec 06 18:35:43 EST 2016
stash.home.build.version=4.11.2
When I follow these instructions,
I get the following error,
$ sudo ./bitbucket.diy-restore.sh bitbucket-20180628-170624-645
[common.sh:17 -> source][martin-Lenovo-YOGA-900-13ISK2] DEBUG: Using vars file: './bitbucket.diy-backup.vars.sh'
[bitbucket.diy-restore.sh:0 -> main][martin-Lenovo-YOGA-900-13ISK2] INFO: Preparing for restore
ls: cannot access '/var/atlassian/application-data/bitbucket1/': No such file or directory
[disk-rsync.sh:40 -> prepare_restore_disk][martin-Lenovo-YOGA-900-13ISK2] DEBUG: Running mkdir -p /var/atlassian/application-data/bitbucket1/
[disk-rsync.sh:40 -> prepare_restore_disk][martin-Lenovo-YOGA-900-13ISK2] DEBUG: Running chown atlbitbucket:atlbitbucket /var/atlassian/application-data/bitbucket1/
[archive-tar.sh:45 -> restore_archive][martin-Lenovo-YOGA-900-13ISK2] DEBUG: Running tar -xzf /home/martin/Downloads/atlassian-bitbucket-diy-backup/bitbucket-20180628-170624-645.tar.gz -C /tmp/bitbucket.diy-restore.cg15hd
tar: Removing leading `/' from member names
[bitbucket.diy-restore.sh:0 -> main][martin-Lenovo-YOGA-900-13ISK2] INFO: Restoring disk (home directory and data stores) and database
[disk-rsync.sh:51 -> restore_disk][martin-Lenovo-YOGA-900-13ISK2] DEBUG: Running rsync -av /tmp/bitbucket.diy-restore.cg15hd/bitbucket-home/ /var/atlassian/application-data/bitbucket1//
sending incremental file list
rsync: change_dir "/tmp/bitbucket.diy-restore.cg15hd/bitbucket-home" failed: No such file or directory (2)
sent 20 bytes received 12 bytes 64.00 bytes/sec
total size is 0 speedup is 0.00
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1196) [sender=3.1.2]
Note there is a bad path in the above,
/var/atlassian/application-data/bitbucket1//
UPDATE: I edited the vars.sh file and changed the path to exclude the trailing "/" (which is opposite to the comments, but the result was exactly the same, except the "bad path" I noted above only had one "/" (not "//").
UPDATE: I tried the bitbucket restore client, and the result,
sudo java -Dbitbucket.home="/var/atlassian/application-data/bitbucket" -jar bitbucket-restore-client.jar /home/martin/Downloads/atlassian-bitbucket-diy-backup/bitbucket-20180628-170624-645.tar
[sudo] password for martin:
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.codehaus.groovy.reflection.CachedClass (file:/home/martin/Downloads/bitbucket-backup-distribution-3.5.1/bitbucket-backup-client-3.5.1/lib/groovy-all-2.4.15.jar) to method java.lang.Object.finalize()
WARNING: Please consider reporting this to the maintainers of org.codehaus.groovy.reflection.CachedClass
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
2019-05-02 21:08:36,374 INFO Initializing
2019-05-02 21:08:37,853 INFO Unpacking bitbucket-20180628-170624-645.tar to /var/atlassian/application-data/bitbucket
2019-05-02 21:10:34,023 INFO Validating database before restore
2019-05-02 21:10:34,491 ERROR bitbucket-20180628-170624-645.tar could not be restored
java.lang.reflect.UndeclaredThrowableException: null
at java.sql/java.sql.DriverManager.getConnection(DriverManager.java:677)
at java.sql/java.sql.DriverManager.getConnection(DriverManager.java:189)
... 36 more frames available in the log file
UPDATE: I tried another version of the bitbucket restore client (3.4.0), but I got many JAVA errors. I am running Ubuntu 18.04.