Forums

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

Confluence uninstalled unintentionally

Jake King July 23, 2018

I uninstalled Confluence unintentionally.  I tried to reinstall it, but my backup is only of the database.  How I can tell Confluence to use the database (which I re-imported) without starting all over?

2 answers

1 vote
AnnWorley
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 23, 2018

Hi Jake,

There is also data in the Confluence Home directory, notably atachments. If that's gone we can still recover the rest of the instance.

To get the rest of your data running in Confluence please:

  1. Install Confluence (same version) pointing to a new, empty database. The setup wizard overwrites the database if you have data in there, hence the "dummy" db.
  2. Shut down Confluence.
  3. Edit the file confluence.cfg.xml in the root of the <Confluence_Home>directory.
  4. Change the hibernate connection URL to point to your new database - the database name is the only entry you should have to change. This example is for PostgreSQL - your syntax will vary according to database type:

    <property name="hibernate.connection.url">jdbc:postgresql://localhost:5432/databasename</property>
  5. Start Confluence - your data should be there sans attachments unless you had a backup of the home directory.

I look forward to hearing how this works for you.

Cheers,

Ann

Jake King July 23, 2018

I tried installing it fresh, letting it overwrite the database, and restoring the database from backup in place, but that doesn't seem to have made a difference (this is before everyone answered)

AnnWorley
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 23, 2018

What happens now when you log in - it sees your restored database or it looks like a new installation?

Do you have any file system backups or automatic XML backups in Confluence_Home/backups? The latter can be imported into a new instance and restore everything but third party add-ons.

Jake King July 23, 2018

it thinks it's a new installation still.  I must have screwed something up, because if I try to access the website, it comes up with the 'Load content: Example Site, Empty Site, Restore From Backup'.  Clicking on any one of these gives me 'Set up step error'.

AnnWorley
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 23, 2018

You can reset the setup wizard by deleting  Confluence_Home/confluence.cfg.xml. After you complete it you will have a confluence.cfg.xml with all the hibernate properties for your DBMS - it varies between database types so installing against an empty db of the same type is best. Restoring the db as you are doing after the fact is also an option.

If you decide to install then restore the db, make sure Confluence is down when you restore the db, then restart Confluence with the new database in place, in the location designated in confluence.cfg.xml

Best wishes for these steps to work for you.

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.
July 23, 2018
  • Try a fresh reinstall first using the internal H2 database - do not connect it to the current database.
  • Then edit your confluence.cfg.xml file and point it to the database.

Not sure if it will work but give it a try.

Jake King July 23, 2018

Where is the confluence.cfg.xml file located?

I can't find it, even with a search.

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.
July 23, 2018

Just to confirm - your current setup has an external database and is not using the default database right ?

Jake King July 23, 2018

that is correct, Mariadb, installed on localhost

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.
July 23, 2018

Your file should be in  ..../application-data/confluence/

Jake King July 26, 2018

managed to get it all figured out.  I had to:

-Make current snapshot of server

-Return the Server to a snapshot made 2 weeks prior.

-make new Backup export for Confluence on older instance of server

-Return Server back to 'current' snapshot

-uninstall Confluence

-reinstall confluence, and restore back from the backup made from 2 weeks prior.

-make sure everything was currently working, and create another new snapshot

-import the database dump I had made previously at the start of all of this.

 

managed to recover everything after that, and it resolved my previous issue with Collaborative editing not working (which was what started this whole mess anyways).

AnnWorley
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 26, 2018

Hi Jake,

Thanks for circling back to this thread to let the Community know what worked for you. Happy to hear Confluence is running and collaborative editing is working.

Cheers,

Ann

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events