Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

problem in restoreing the bitbucket data

sivashankar August 31, 2018

Hi,

I am following this  document to backup and restore the data in my local sever.

https://confluence.atlassian.com/bitbucketserver/using-bitbucket-zero-downtime-backup-829920023.html

After configuring  the bitbucket server i am tried to backup and restore the data.

I got the backup file successfully.

Now i am trying to restore the data. 

by running this command

./bitbucket.diy-restore.sh bitbucket-20180831-181100


[common.sh:17 -> source][infyn] DEBUG: Using vars file: './bitbucket.diy-backup.vars.sh'
[archive-tar.sh:35 -> prepare_restore_archive][infyn] ERROR: Cannot restore over existing contents of '/home/dev/zero/'. Please rename or delete this first.
Stack trace:
[./archive-tar.sh:35 -> prepare_restore_archive]
[./bitbucket.diy-restore.sh:0 -> main]

Renamed  home directory  to another name but again its not working  getting same error.

Again and again .

so, kindly help in backup the data  in bitbucket

Thank & regards

siva

sivashankar.veerasamy@infynect.com

 

1 answer

0 votes
Prasanth
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 5, 2018

Hi Sivashankar

From the error message, script fails at below location in archive-tar.sh

if [ -e "${BITBUCKET_HOME}" ]; then
bail "Cannot restore over existing contents of '${BITBUCKET_HOME}'. Please rename or delete this first."
fi

Have you specified the right BITBUCKET_HOME in bitbucket.diy-backup.vars.sh?

Is /home/dev/zero/ the BITBUCKET_HOME directory?

You have mentioned that you have renamed the home directory, have you renamed the above one?

Best regards,
Prasanth Thaikkalloor

infyn
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
September 7, 2018

Hi prasanth,

Have you specified the right BITBUCKET_HOME in bitbucket.diy-backup.vars.sh?

yes, i have specified correct path by creating a new path to restore.

dev@infyn:~/atlassian-bitbucket-diy-backup$ ./bitbucket.diy-restore.sh bitbucket-20180906-165224

[common.sh:17 -> source][infyn] DEBUG: Using vars file: './bitbucket.diy-backup.vars.sh'

[archive-tar.sh:35 -> prepare_restore_archive][infyn] ERROR: Cannot restore over existing contents of '/home/dev/Zero/'. Please rename or delete this first.

Stack trace:
[./archive-tar.sh:35 -> prepare_restore_archive]
[./bitbucket.diy-restore.sh:0 -> main]

Prasanth
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 10, 2018

Hi Kumaravel

This is interesting!  Can you please check whether the directory exists after the restore run fails or it just returns true for a non-existing directory?

if [ -e "${BITBUCKET_HOME}" ]

 You may also check whether there are any other section in the back up script that creates this directory.

Try running below also and see what it returns

if [ -e /home/dev/Zero/ ]; then echo "Exists"; else echo "Doesn't exist"; fi

You may also run it for an existing and non existing directory and check what it returns.

-Prasanth

sivashankar September 13, 2018

Hi prasanth,

Thanks for your reply 

I tried the above approach

the home directory exit.

./bitbucket.diy-restore.sh bitbucket-20180827-205924
[common.sh:17 -> source][infyn] DEBUG: Using vars file: './bitbucket.diy-backup.vars.sh'
Exists
[archive-tar.sh:35 -> prepare_restore_archive][infyn] ERROR: Cannot restore over existing contents of '/home/dev/Zero'. Please rename or delete this first.
Stack trace:
[./archive-tar.sh:35 -> prepare_restore_archive]
[./bitbucket.diy-restore.sh:0 -> main]

Again Renamed the  folder called bithome

dev@infyn:~/atlassian-bitbucket-diy-backup$ ./bitbucket.diy-restore.sh bitbucket-20180827-205924
[common.sh:17 -> source][infyn] DEBUG: Using vars file: './bitbucket.diy-backup.vars.sh'
Exists
[archive-tar.sh:35 -> prepare_restore_archive][infyn] ERROR: Cannot restore over existing contents of '/home/dev/bithome'. Please rename or delete this first.
Stack trace:
[./archive-tar.sh:35 -> prepare_restore_archive]
[./bitbucket.diy-restore.sh:0 -> main]

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events