Confluence Clean Refresh
Asked by jiraguy:

Hi,

Quick question. I know with JIRA you can point it to a new DB and do a clean install, can you do the same with Confluence?

I tried pointing Confluence to a new DB and it did not like that.

However, I deleted the confluence.cfg.xml file and went to my confluence url and it allowed me to do a setup again. Is that an approved way to go about it or will I run into problems?

Best,

Graham


Answers:
author: AlysonA
body: I see, thanks for clarifying. =)

That being the case, you can simply wipe out the \<confluence-home\> folder and restart it, It will look as a new install. When you get the to the "Configure Database" step, just choose to overwrite the current one and you're good to go.

Hope it helps!

comments: author: nigelb14
body: Don't do this! Doing this will prevent your Confluence server from starting up as it will remove the daemon startup script, which lives in the confluence-home directory.

This applies to confluence 6.7 (and probably upwards).


author: Nic Brough -Adaptavist-
body: Er, this is a 6 year old question and answer.

Plus, scrubbing the \<confluence home\> directory will NOT remove the daemon start script - that's held in the startup script directories (On unix-like systems) and the installation directory (on Windows systems)


author: nigelb14
body: Ok, well removing the \<confluence home\> directory will still break it.


author: Nic Brough -Adaptavist-
body: No, it won't, it'll cause confluence to believe it needs to complete and install. "Broken" if you're trying to use a Confluence, but the point of the question was how to go back to an install cycle.


author: nigelb14
body: Well, this is what happened when I removed the \<home directory\>

```
root@jira:/opt/atlassian# rm -rf confluence/

root@jira:/opt/atlassian# /etc/init.d/confluence start

/etc/init.d/confluence: line 4: cd: /opt/atlassian/confluence/bin: No such file or directory

/etc/init.d/confluence: line 8: ./start-confluence.sh: No such file or directory
```

Maybe you mean the data directory should be deleted?


author: Nic Brough -Adaptavist-
body: Nope, you removed Confluence. Not the Confluence home directory. Try again.


author: Nic Brough -Adaptavist-
body: [@nigelb14](/t5/user/viewprofilepage/user-id/1182893)- I am sorry about the previous comment. I've left it there so people can see why I'm apologising.

I've just re-read it and it came out wrong. I think when I wrote "try again", I was thinking completely wrong, and I really should have explained what I really was thinking and in a way that comes across in a better tone.

It seems to me that you are relatively new to Atlassian, and you have not quite picked the terminology Atlassian tends to use. You have mixed up "confluence home" with "all of confluence". This has lead to you misunderstanding the question and the answer, and hence giving inaccurate advice, which I've then gone on to try to correct in a very unwelcoming and grumpy way.

I unreservedly apologise for my tone in that last comment. I hope it won't discourage you from participating more in the community.


author: nigelb14
body: I believe there was indeed some unexpected use of terms.

Thanks for your response.


author: William Zanchet [Atlassian]
body: Hey,  

You can setup a test environment which your own data:  

**Creating a test environment and import the XML Backup (the way that I personally do).**   

1. Go to your production site, and go to _Browse \> Confluence Admin \> Backup \& Restore_ and mark just the attachments option.
2. Go to [atlassian.com](http://atlassian.com) and download the same version of Confluence that you have in your production. ( I prefer to download the standalone version ).
3. Extract the zip/tar.gz file of the latest version of Confluence on the place you choose. ( I highly suggest that you create a folder call: Confluence 4.3, and inside of this folder extract the install folder, and inside of the Confluence 4.3 folder create a folder call: Home ).
4. Into the extracted folder, open the file confluence-init.properties, which is located at Confluence install directory\\confluence\\web-inf\\classes and edit the line: confluence.home=/usr/local/confluence/home to point to the path where is your new home folder of your Confluence.
5. Now start Confluence.
6. Create a new database in your tool, e.g: MySQL, Postgres, MSSQL... I mean a clean one.
7. Once that Confluence is configured/running go to _Browse \> Confluence Admin \> Backup \& Restore_ and choose that XML backup that you've generated in your production.
8. Now you'll have your clone up and running, with your data.

<br />

You don't have to worry about your database, with the full XML backup, Confluence will do the magic, I mean, populate the new database, make everything right. So, you don't need to do a clone of your database.  

I hope this helps.  

Cheers,  

WZ


author: AlysonA
body: Hello,

May I know exactly what you're trying to accomplish? For instance, if you're migrating Confluence to a new server, you can follow [these instructions](https://confluence.atlassian.com/display/DOC/Migrating+Confluence+Between+Servers) that will involve more than just pointing Confluence to a new DB.

If you just want to start a new install, you can basically download a new standalone zip file (in case you don't want to mess with the current one) and proceed with the normal installation.

Cheers

comments: author: jiraguy
body: I have Confluence installed on the machine. I'd like not have to reinstall it but just instead get rid of the current stuff in my instance and make it look brand new.