What tells confluence to run setup?

Scott Beeson
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.
November 3, 2015

I had a failure and now I'm trying to restore Confluence to another server.  I did a fresh install of the version I was running (5.7) and restored the database from a date before the crash.  I modified the confluence.cfg.xml file to point to the database.  When I access localhost:8090 it tries to do the setup, asking for the license and stuff.

So, I then copied a backup of the entire /confluence and /application data/confluence folders to the new install location.  The same thing still happens.  

How can I tell it not to do the setup?  What is the simplest way to just restore an installation?  I am so confused.

3 answers

1 accepted

1 vote
Answer accepted
Mallmann
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 3, 2015

Hi Scott,

The file confluence.cfg.xml contains a few details that tells Confluence whether this is or not a new installation.

There are a few ways to roll the instance back, but follow two paths you can take:

  1. If you have a backup copy from your Database, Confluence Installation Folder and Confluence Home Directory:
    1. Shut your Confluence down
    2. Restore the database backup on your Confluence's database, replacing the current one
    3. Restore the Confluence Home Directory, replacing the current one
    4. Restore the Confluence Install Folder, also replacing the current one
    5. Start your Confluence again from the Confluence Install Folder you've restored
  2. In case you have only the database backup copy, this guide describes the steps to follow.

You need to make sure that the confluence-init.properties file is correctly pointing to this new home directory, thus Confluence will find the confluence.cfg.xml file and you should be able to start the restored instance.

This file is located under <confluence-install>/confluence/WEB-INF/classes/confluence-init.properties.

 

I hope it helps,

Eduardo

Scott Beeson
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.
November 3, 2015

Well I tried doing option 1, twice, and I just get a 404 at http://localhost:8090. I have verified the port in the cfg file and I can see that tomcat is running. No idea what is going on. I'm trying option 2 now.

Scott Beeson
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.
November 3, 2015

Okay I did option 2 and now I get this: HTTP Status 500 - java.lang.IllegalStateException: Spring Application context has not been set

Scott Beeson
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.
November 3, 2015

I've tried dozens of variations of the confluence.cfg.xml file and they all result in the error above. I can revert it to the default state and get to the setup wizard again but any time I try to put other properties in there I get the 500 error. I'm very frustrated.

Scott Beeson
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.
November 4, 2015

So here is what finally worked: 1. Install Confluence, exact build. 2. Go through setup as normal. 3. Create "empty" space. 4. Restore database. It seems really obvious but it's not really what the docs say...

Like Maxim Zaripov likes this
Scott Beeson
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.
November 4, 2015

Marked yours as answer because you technically answered the question which was "What tells confluence to run setup". Thanks for getting me headed in the right direction.

Like Maxim Zaripov likes this
0 votes
Guilherme V.
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 9, 2015

Hey Scott,

The exact parameter that tells Confluence to run the setup is the setupStep parameter inside the confluence.cfg file.

If you finish all the steps, the parameter will be listed as:

&lt;setupStep&gt;complete&lt;/setupStep&gt;
0 votes
Scott Beeson
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.
November 4, 2015

So here is what finally worked:

  1. Install Confluence, exact build as before.
  2. Go through setup as normal
  3. Create "empty" space.
  4. Restore database.
  5. Restore attachments folder

It seems really obvious but it's not what the docs say...  I also don't understand why restoring the folders and database exactly as they were gave me so many fits.  Either way, it's working and the steps above are simple and seem to work if you follow them exactly.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events