Forums

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

unable to perform full restore to new server

Mark Recoskie August 21, 2018

As a first step in upgrading our instance I'm migrating Confluence 5.4.4 running on CentOS 5.11 MySSQL 5.5.55 to Confluence 5.4.4 on CentOS 7.5 and PostgreSQL 9.4.19.

Steps:

1. Backup with attachments from Administration->Backup & Restore on old system

2. Restore with Build Index to new system

Problem: none of the attachments get migrated to new install.

Test: restore the backup set to the old system (the one which was just backed up).  Same problem, none of the attachments, custom icons etc are restored.

 

Please help.

 

Rafal

 

 

2 answers

0 votes
Brant Schroeder
Community Champion
August 21, 2018

DB storage is deprecated.  You should migrate the attachments from the DB to local storage. Then perform your backup and restore.  If the files are not transferred then you can just copy the directory from the old server to the new server.  

Information about attachment storage can be found here: https://confluence.atlassian.com/doc/attachment-storage-configuration-166876.html

Mark Recoskie August 21, 2018

Getting this error when attempting to switch attachment storage type to local:

 

2018-08-21 16:00:28,368 ERROR [Long running task: Attachment data migration] [confluence.util.longrunning.AttachmentMigrationLongRunningTask] runInternal
-- url: /admin/doattachmentmigration.action | userName: rafal | referer: http://docs.pikatech.com/admin/doeditattachmentstorage.action | action: doattachmentmigration
java.lang.NullPointerException
at java.io.File.<init>(Unknown Source)
at com.atlassian.confluence.pages.persistence.dao.BootstrapAttachmentLocationResolver.getFileLocation(BootstrapAttachmentLocationResolver.java:18)
at com.atlassian.confluence.pages.persistence.dao.FileSystemAttachmentDataDao.getConfluenceAttachmentDirectory(FileSystemAttachmentDataDao.java:56)
at com.atlassian.confluence.pages.persistence.dao.HierarchicalFileSystemAttachmentDataDao.getConfluenceAttachmentDirectory(HierarchicalFileSystemAttachmentDataDao.java:74)
at com.atlassian.confluence.pages.persistence.dao.FileSystemAttachmentDataDao.prepareForMigrationTo(FileSystemAttachmentDataDao.java:424)
at com.atlassian.confluence.pages.persistence.dao.hibernate.AbstractHibernateAttachmentDao$IntraHibernateAttachmentMigrator.migrate(AbstractHibernateAttachmentDao.java:783)
at com.atlassian.confluence.util.longrunning.AttachmentMigrationLongRunningTask$1.doInTransactionWithoutResult(AttachmentMigrationLongRunningTask.java:79)
at org.springframework.transaction.support.TransactionCallbackWithoutResult.doInTransaction(TransactionCallbackWithoutResult.java:33)
at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:128)
at com.atlassian.confluence.util.longrunning.AttachmentMigrationLongRunningTask.runInternal(AttachmentMigrationLongRunningTask.java:74)
at com.atlassian.confluence.util.longrunning.ConfluenceAbstractLongRunningTask.run(ConfluenceAbstractLongRunningTask.java:26)
at com.atlassian.confluence.util.longrunning.ManagedTask.run(ManagedTask.java:35)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)

Brant Schroeder
Community Champion
August 21, 2018

That is a common issue - https://confluence.atlassian.com/confkb/migrating-attachments-from-database-to-file-system-fails-with-transaction-log-full-exception-781392542.html

Since you are migrating large files from the DB you may need to increase the amount of RAM allocated to the instance.

Mark Recoskie August 21, 2018

This is a different error. The one you pointed out refers to problem with transaction log in MSSQL sever where as my issue is a null pointer exception error thrown by java.IO.File, perhaps missing folder or file reference? (I created both attachments and backup folders just in case that was the issue). 

In addition, current system has 4GB of RAM and the full backup set with attachments is only about 4MB in size (double the recommended amount).  Most attachments are small pngs and pdfs.  Should be more than enough RAM for such small instance.  

Brant Schroeder
Community Champion
August 22, 2018

Sorry sent the wrong link.  This is the one you need.  https://confluence.atlassian.com/confkb/confluence-throws-nullpointerexception-when-migrating-attachments-from-database-to-filesystem-933097621.html  

This tells you how to update the config file to point to the correct attachments location.

Mark Recoskie August 22, 2018

That was it.  Thanks for the help!

0 votes
Vickey Palzor Lepcha
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.
August 21, 2018

Try restoring Attachment separately - don't make it a part of your backup.

After you restore your confluence - try copying the attachments separately to your new server.

Mark Recoskie August 21, 2018

what is the location of attachments on the file system?  

Vickey Palzor Lepcha
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.
August 21, 2018

umm under your home directory ...would look something like this;

 

.........\application-data\confluence\attachments\

Mark Recoskie August 21, 2018

That would be simple. I don't have that folder in my original install. Also, Admin->Attachment Storage is set to In Confluence's configured database 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events