migrating Confluence to another server
Asked by sanan sanan:

Hi,

We need to create a ditto copy of our Confluence production server which has a huge amount of data. We want to do it for our test purposes. To achieve this, we followed below process.

1) Copied the existing app folder to new server at the same path.

2) Copied database (Oracle 12C) to a new server and gave it a new name.

3) Installed Confluence (same version, 7.1.2) on new server.

4) Set application-data in new installation

5) modified the confluence.cfg.xml file to reflect new database name.

After this we started Confluence on new instance. It starts and we are able to open it. But we are not able to login into it.

In the logs it gives lots database related errors. Like below:

\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*

Caused by: Error : 955, Position : 13, Sql = CREATE TABLE "AO_7CDE43_SERVER_CONFIG" (  
"CUSTOM_TEMPLATE_PATH" CLOB,  
"DEFAULT_USER_ID_TEMPLATE" VARCHAR(255),  
"ENABLED_FOR_ALL_USERS" NUMBER(1),  
"GROUPS_WITH_ACCESS" CLOB,  
"ID" NUMBER(11) NOT NULL,  
"NOTIFICATION_MEDIUM_KEY" VARCHAR(255),  
"SERVER_NAME" VARCHAR(255),  
PRIMARY KEY("ID")  
), OriginalSql = CREATE TABLE "AO_7CDE43_SERVER_CONFIG" (  
"CUSTOM_TEMPLATE_PATH" CLOB,  
"DEFAULT_USER_ID_TEMPLATE" VARCHAR(255),  
"ENABLED_FOR_ALL_USERS" NUMBER(1),  
"GROUPS_WITH_ACCESS" CLOB,  
"ID" NUMBER(11) NOT NULL,  
"NOTIFICATION_MEDIUM_KEY" VARCHAR(255),  
"SERVER_NAME" VARCHAR(255),  
PRIMARY KEY("ID")  
), Error Msg = ORA-00955: name is already used by an existing object

\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*

It seems it is trying to re-create all the tables. Can someone please guide as what wrong are we doing here. We just want to create a mirror image of Confluence server. Instead of using Confluence's own backup-restore function. We are trying to use direct copy from server to server and db to new db.

Regards

Sanan


Answers:
author: sanan sanan
body: problem is solved.

Thanks for the replies.


author: JP _AC Bielefeld Leader_
body: Hi,

before upgrading/installing Confluence 7 on the new server, I would try to get it running with the old version. As we don't use Oracle I can only describe my steps when setting up a test/staging server:

1. Make a consistent backup of the Confluence database \& restore the backup on the test database server using the SAME db name / schema etc...

2. Stop Confluence \& create a copy of the install \& data directories. Restart Confluence.

3. Restore the install \& data directory on the test/staging application server using the exact same directory structure \& access rights.

4. Edit the server.xml (Tomcat configuration) in the conf subdir

We use datasources controlled by Tomcat \& not Confluence specific datasources. Therefore I only have to configure the resource settings for the JDBC datasource to point to the test/staging db server \& check user \& password.

I also configure disable mails send from the test server by setting:

`-Datlassian.mail.senddisabled to true`

`in the system properties.`

<https://confluence.atlassian.com/doc/configuring-system-properties-168002854.html>

5. Depending on your server OS, you might want to register Confuence as a service.

6. Start the test server using the same user name used on your production server.

The test server should startup without any errors, apart from the disabled mailing.

Any upgrades to Confluence 7 should be done AFTER a successful migration to the test server.

Best

JP

comments: author: sanan sanan
body: Hi JP,

After renaming the schema and user name same as old db. it has has worked. Now db is able to connect.

thanks for the tip.

regards

sanan


author: DPKJ
body: I suggest you to follow step mentioned below, this know issue with Confluence and Oracle.

<https://confluence.atlassian.com/confkb/ora-00955-name-is-already-used-by-an-existing-object-317949251.html>


Tags: confluence-server

migration

server