Restore Older Version (4.3.2) Into new VM and higher version (5.5.4)
Asked by AndrewP:

What is the most painless way to do this?

I've spun up a VM and installed the application (Confluence 5.5.4). I've configured Crowd and the Base URL along with the Proxy.

I know I have to restore some key data to make it look and feel like the existing 4.3.2 - also need the attachments file and plenty more.

Any suggestions?


Answers:
author: Nic Brough -Adaptavist-
body: Start by stopping thinking of this as a "restore". It's an upgrade - you're upgrading from 4.3.2 to 5.5.4.

See <https://confluence.atlassian.com/display/DOC/Upgrading+Confluence>

As for "making it look and feel like 4.3.2", that's a non-starter. The upgrade will include all your settings and internal configuration, but the interface has moved on from 4.3.2, and you'll need to hack core code to downgrade it all to 4.3.2. It's simply an utter waste of time - educating your users that things have changed is a far better use of the time (and less of a wrench when you go to 5.5 or 5.6). That said, the changes are not that massive between 4.3 and 5.5 - things are in roughly the same place, more options appear, and so-on

comments: author: AndrewP
body: I just realized I wrote that wrong...

What I meant to say is that I want the content of what we have in 4.3.2 to be restored into 5.5.4 - and what has any user found as helpful in getting this task done?

Sorry for the confusion.

I am reviewing onling tutorials and data but figured I would pose this question here as well.

Thanks.


author: Nic Brough -Adaptavist-
body: No problem - it's always worth asking!The question for me is if you're trying to upgrade or just import some bits from 4.3.2? I've covered the upgrade side of it, but if you really are just wanting to grab a couple of spaces from an old system and import it into a 5.5 and it's just the raw data you want, then that's also quite easy. You can export a whole space to XML in 4.3 and then simply tell 5.5 to import it. It will happily import the space with as much of the settings as it can. You might have some minor issues with macros or precise config settings, but the pages and so-on will be fine.


author: AndrewP
body: I need to import the the entire content of 4.3.2 including attachments. In this case would it be easier to install 4.3.2 on the new VM - restore the current 4.3.2 there and then upgrade instead?


author: Nic Brough -Adaptavist-
body: That is the safest easiest route, yes.


author: AndrewP
body: Thanks for your comments and time!


author: AndrewP
body: Okay - so I have installed 4.3.2 and this was done using a copy of the Confluence Home and Atlassian Servers from Production. One modification was to set the DB in the confluence.cfg file to a seperate (new) DB because we do not want to connect to Production yet. We are still attempting to load a Staging and Dev environment and then restore Production into these environments.As mentioned though, it's failry big so I am following this process which include moving over the folder I have mentioned above.<https://confluence.atlassian.com/display/DOC/Migrating+Confluence+Between+Servers>So I start Confluence with these folders (from Production) and a new DB and it simply looks like a new installation of 4.3.2.Seems like the DB has to be connected to Production through the confluence.cfg file - or at least a copy, in order for the new environment to look like the Production environment.Is this true and can I use a copy of the Production DB?


author: Nic Brough -Adaptavist-
body: Yes, you can use a copy of the production DB. My usual routine is: stop confluence production, dump database, restart confluence production, copy dump file to dev/test, load into test database, hack confluence config file to say "look at test database", and start it up.


author: AndrewP
body: So if I have my DB team pull a live copy of the Prod DB and post it on a seperate DB server, all I need to do is link the DB via confluence.cfg file correct? I think that's the same result - different process as what you have mentioned above. And thanks!


author: Nic Brough -Adaptavist-
body: I think it's the same as what I described, just different words... Whatever words we use though, yes, you've got the right idea.


author: AndrewP
body: Great! I am bring the DB's over and will link - I will let you know! Thanks again!!!


author: AndrewP
body: So maybe my way is different. I am getting an error message - com.atlassian.util.concurrent.LazyReference$InitializationException: java.lang.NullPointerExceptionWhen I try to connect to a copy of the DB in 4.3.2 as well as on another server which has 5.5.4 on it. How exactly do you "Load" your db's into Test?All I am doing is stopping the Service and changing the confluence.cfg file.


author: Nic Brough -Adaptavist-
body: Use the standard db tools. "Mysql_dump confluence \> afile", "cp afile testserver", "mysql confluence test \< afile"


author: AndrewP
body: Is this on the DB Server - Our DB team handles everything.


author: Nic Brough -Adaptavist-
body: You don't actually need to do it on the db server, but it's unusual not to. All I'm doing is using a standard way to copy a single database from one place to another.


author: AndrewP
body: So I have the application (4.3.2) loaded. I tried to connect to a copy but of course that just will overwrite the DB - defeats the purpose altogether. I then tried to connect to another DB - a few months older - of course that overwrites but then I change the cfg file and it throws out errors (above).So what I have done now is to connect to the original copy - overwrite and I will have our DB team restore that DB with data from PROD. We'll give that a shot.


author: AndrewP
body: Okay - update: This restore worked but the site comes up with the base URL set to PROD - perfectly normal right? Problem is that the Browse arrow which would allow me to select Confluence Admin in the ribbon does not work at all - nor does the user arrow - also in the ribbon, work.So this is where I am dead in the water at the moment.Could it be that I am not importing a file from the PROD server?


author: AndrewP
body: Okay - We've cleared up the problem and I think I am very close. One last issue is getting logged on. I need to Recover Admin Rights which I have done in JIRA and Confluence before. Only this time I am running into a problem.Here is the documentation I am using for this: <https://confluence.atlassian.com/display/DOC/Restoring+Passwords+To+Recover+Admin+User+Rights#RestoringPasswordsToRecoverAdminUserRights-nolocal>My issue is with "If No Local Administrator Exists"When I run: insert into cwd_user(id, user_name, lower_user_name, active, created_date, updated_date, first_name, lower_first_name, last_name, lower_last_name, display_name, lower_display_name, email_address, lower_email_address, directory_id, credential) values (1212121, 'admin', 'admin', 'T', '2009-11-26 17:42:08', '2009-11-26 17:42:08', 'A. D.', 'a. d.', 'Ministrator', 'ministrator', 'A. D. Ministrator', 'a. d. ministrator', 'admin@example.com', 'admin@example.com', (select id from cwd_directory where directory_name='Confluence Internal Directory'), 'x61Ey612Kl2gpFL56FT9weDnpSo4AV8j8+qx2AuTHdRyY036xxzTTrw10Wq3+4qQyB+XURPWx1ONxp3Y3pB37A=='); insert into user_mapping values ('2c9681954172cf560000000000000001', 'admin', 'admin');I get this error: Msg 2627, Level 14, State 1, Line 1Violation of UNIQUE KEY constraint 'cwd_user_name_dir_id'. Cannot insert duplicate key in object 'dbo.cwd_user'. The duplicate key value is (admin, 294913).The statement has been terminated.


author: Nic Brough -Adaptavist-
body: That's telling you that you already have a local administrator. You need to check what is there already before trying this insert.


author: AndrewP
body: Okay - we resolved that. Apparently the Admin prior never had a local admin account in Production. We added that and then restored the data - able to get in. So now we upgraded but when we start service and LAUNCH. It spins. LOTS of data coming across and now we are on "Waiting for Local Host" for 7 minutes now.Is this normal when you upgrade?


author: AndrewP
body: Looked for errors on the log - none - looks like it's just updating files and such. Probably a non-issue.


author: AndrewP
body: Updating for 14 hours... Is that normal?


author: Nic Brough -Adaptavist-
body: That doesn't sound right. How big is your install? Millions of pages and tens of thousands of attachments?


author: AndrewP
body: Finally ended - We have 25 GB on the Attachment Folder - not sure how many pages. Start Up errored out however (see below). I opened a ticket with Atlassian.Unable to start up Confluence. Fatal error during startup sequence: confluence.lifecycle.core:pluginframeworkdependentupgrades (Run all the upgrades that require the plugin framework to be available) - com.atlassian.confluence.content.render.xhtml.migration.exceptions.MigrationException: java.util.concurrent.ExecutionException: java.lang.OutOfMemoryError: Java heap space


author: Nic Brough -Adaptavist-
body: Ah, that means what it says - it needs more memory. It's not finished the upgrade and it won't start until it has. It's trying to do the upgrade, but hasn't got enough memory to run the code.You need to allocate it more memory...


author: AndrewP
body: It came up after I restarted seervices just fine. I will wait on Atlassian for the 14 hour upgrade issue.THANKS A TON FOR YOUR SUPPORT!!!I will update the Question with the final answer as soon as I have it!THANKS AGAIN!


author: AndrewP
body: Okay then... So firstly I am the one admin of several services which is why it's taken me so long to post an answer.

It seems that the 14 hours that it took to update from 4.3.2 to 5.5.4 is based on how the data is managed in the newer version - and is acceptable. It is a set it and forget it sort of process. During that time the app will not come up - may show a "cannot reach website" or similar error but keep checking the log file and you can see that the app is being updated.

One thing to note - we had some users who could and those who could not log into the new system. We found that in the cwd_user db that those who had a password set to "nopass" needed to be updated to "X" and then they were able to log in. \*\*\*NOTE\*\*\* that we use a CROWD interface between AD and the App itself.

Thanks NIC for all your patience and help!


Tags: confluence-administration