Attachments not available after restore

Steffen Becker October 10, 2018

I want to setup a Confluence test instance as a copy of my prod instance. (both version 6.12.0)

attachments dir: 40 GB

xml export: 2 GB

 

1. attempt

I created a "full" export (with attachments) from my prod instance.

In the setup wizard of my test instance, I selected this export. But it timed out and this test instance wasn't reachable after that

 

2. attempt

I created an xml export (w/o attachments) from my prod instance.

Starting again with a fresh test instance, restoring this export in the setup wizard worked fine (took about 40minutes), but (of course) I had no attachments in my test instance now.

 

3. attempt

Now I just copy&pasted the attachments & plugin-data directories from prod to test (set correct permissions) and restarted & reindexed my test instance. But attachments do not show up.

 

4. attempt

Inside this running test instance (w/o attachments) I again tried to do a "full" restore from the "full" prod export.

I got a proxy time out and after multiple hours of waiting I don't have any attachments in my test instance.

 

Some (maybe relevant) information:

- I'm behind a corporate proxy

- I use a custom authenticator

 

Does anyone has an idea how I get my attachments into my test instance?

1 answer

1 accepted

2 votes
Answer accepted
Mirek
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 10, 2018

If you have a large instance I do not recommend XML backup because of all problems that you describe and even more...

I mostly work on Linux machines and making a test system by creating a database dump (or copying data on a database side) and moving attachments/plugins and overall Home directory with rsync. This incrementally move attachments so you do not need to move 40GB (it would only move and remove those that do not exist in test instance). If you automate this you might have a fresh test instance with a few clicks (or even without any)

Steffen Becker October 10, 2018

Well, but the xml ex-/import already succeeded and the attachments are already copied, so in the end I have the same result, haven't I?

The only difference I see is that I only copied attachments and not the whole home directory. So which of these directories should I also copy from prod to test?:

analytics-logs*

attachments*

backups*

bundled-plugins

export*

imgEffects

index

journal

logs*

originaltheme

plugins-cache*

plugins-osgi-cache*

plugins-temp*

recovery*

restore*

shared-home

temp*

thumbnails

viewfile

webresource-temp*

 

* I'm pretty sure I don't need to copy these directories, just added them to have a complete list

JP _AC Bielefeld Leader_
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.
October 10, 2018

Hi Steffen,

when you do an xml export w/o attachments you will never get the attachments back in your copied site. When restoring from a xml backup the attachments path & file structure is regenerated and is not the same as on your production site. Therefore copying the attachments afterwards doesn't work.

Try the following to get a real working copy of your production server:

1. Shutdown production

2. Copy Confluence home & data

3. Take a Confluence DB dump

4. Startup production

5. Restore DB dump on other DB server  (Make sure version & language / collation settings are same)

6. Configure server.xml to match your new site settings

7. MAKE SURE TO CONFIGURE database connection to new database in confluence.cfg.xml. You might not need this, if you use a JDBC global resource for your DB in server.xml. Then you just change the settings there. BUT you MUST make sure not to fire up the new server using the same DB as the production server.

9. You might want to disable outgoing mail on your new server 

8. Startup new server

9. Set BaseURL for new server

Best

JP

Steffen Becker October 10, 2018

OK thank you!

 

One more question, (even if it's the wrong channel):

Do you know if it's the same scenario for copying a Jira instance? Or is it pssobile in Jira to do an XML ex/import and copy the content of the home directory?

Mirek
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 10, 2018

For JIRA the recommended process is the same.

JP _AC Bielefeld Leader_
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.
October 10, 2018

So do I. Works the same.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events