What tells confluence to run setup?

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

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

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.

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

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.

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...

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.

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.

0 vote

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;

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted Jul 10, 2018 in Confluence

We want to see the templates you've created in Confluence!

Hi Community, Jessica here from the Confluence Product Marketing team!  July’s community challenge is all about sharing pictures  — and as an extension of our first post on what ...

900 views 23 12
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you