Forums

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

Confluence restore from zip takes long time

Kavirajacholan Selvaraj March 29, 2019

Importing Data

Time Elapsed:31 minutes, 44 seconds
Time Remaining:12 hours, 41 minutes, 54 seconds (estimated)
Completion:4% complete

Is there any were I can get it soon? It will be affect during Prod Migration. Please advise.

3 answers

0 votes
Juho Itä
Contributor
August 26, 2020

I was restoring a 14 GB XML zip backup with attachments to a new Linux virtual machine and the estimated restore time was multiple hours.

I realized by checking monitoring stats of the VM that it's doing nothing - no disk or CPU usage. Then in <confluence-home>/logs/atlassian-confluence.log I saw error:

2020-08-26 11:23:59,087 ERROR [Long running task: Importing data] [confluence.util.longrunning.ConfluenceAbstractLongRunningTask] run Long running task "Importing data" failed to run.
 -- referer: http://192.168.0.29:8090/setup/setup-restore-local.action | url: /setup/longrunningtaskxml.action | userName: anonymous | action: longrunningtaskxml
java.lang.OutOfMemoryError: Java heap space

 
I increased system memory reserved for JVM by editing setenv.sh:

# Original line
CATALINA_OPTS="$CATALINA_OPTS -Xms1024m -Xmx1024m -XX:MaxPermSize=256m -XX:+UseG1GC"
# Edited line CATALINA_OPTS="$CATALINA_OPTS -Xms1024m -Xmx4096m -XX:MaxPermSize=256m -XX:+UseG1GC"

* Source: https://confluence.atlassian.com/confkb/cannot-create-or-restore-xml-backup-due-to-outofmemory-errors-128843918.html

Now the restore went through in 36 minutes. My VM had 2 CPU and 8 GB memory.

0 votes
Jacob Peters
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!
March 29, 2019

If it's possible to restore via the cli you could use a ram disk. you're essentially sectioning off a portion of the hosts memory and mounting it as a file system for reads/writes.

 

https://www.techrepublic.com/article/how-to-use-a-ramdisk-on-linux/

0 votes
Kavirajacholan Selvaraj March 29, 2019

@Mark Lang  @Nic Brough -Adaptavist-  Any idea on this? Please advise me. 

Right now I am doing test environment migration. But when it comes to production we cant expect this many hours downtime.

Mark Lang
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 29, 2019

Can I have a bit more detail about what you are doing?  Based on the image/text, I'm assuming this is a space import?  Where are you importing the zip from (NFS, your computer, directly on the Confluence Server)?  

I may need some additional info about the space as well, like size of the zip and how many attachments?  

Kavirajacholan Selvaraj March 29, 2019

Hi Mark,

I am doing the backup import from datacenter to AWS Server using the zip file of entity.xml which will import all the data.

When I build a server on AWS, using URL I am setting up the confluence. After providing confluence license it has options to "restore from backup". there I am importing the data.

If you need any more infromation. Please let me know. this import is full entity.xml file not space or attachment.

Mark Lang
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 29, 2019

Okay that is better for what I wanted to suggest.  Can you consider a DB Dump and Tar/Zip of Confluence Home and then restore the data back in the database and rsync/copy the Confluence Home back into place?  That is going to be much faster and if i remember correctly what Atlassian is going to advise as you get larger.  

It goes without saying but make sure to back up your current production before you do any of this.  

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events