Rollback from Data Center to Server

Dario April 18, 2023

Hi Community!

I have to test the migration from Server to Data Center but I do not feel very confident to do it without to be ensure I will be able to rollback the process.

My question is if it would be enough with a backup of the application and database or, after the migration, the backup would not work.

My idea is to update the license key directly with a Data Center license which it is possible but I have not read anything about how to rollback the environment if something went wrong.

Could you please help me?

Thank you so much in advance.

Kind regards,

Dario

1 answer

1 accepted

0 votes
Answer accepted
Graham Twine
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.
April 18, 2023

Hello @Dario do you have a non prod environment?

The best solution is to backup the data folder and the database as described here

Dario April 18, 2023

hi @Graham Twine ,

Thank you for your quick response.

Indeed, I have a non prod environment which is where I would like to test the migration. 

After reading the link provided, I would like to ensure this procedure is the same for a migration because it is talking about upgrading. I am going to change the license key and i would like to confirm whether I will be able to restore the current license if something would be wrong.

I do not have the current license key so I would not like to loose it after doing the rollback.

Thank you so much!

PD - It is a Confluence migration (I did not mention before)

Kind regards,

Dario

Graham Twine
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.
April 18, 2023

If one  has a copy of the data folder and the database then all one will do is replace the application, data folder and the database as well as the application / configurations and start up  the application again.

This is not so much a rollback as it is a restore from backup process.

Jira has a jira.downgrade.allowed=true flag which worked well for me but that was also DC to DC. Server to DC and back to Server is a big leap so I understand your apprehension.

 

1. Backup the data folder

2. Backup the database

3. backup any changes you have made to things like the server.xml or setenv.sh files

4. execute upgrade / test / shutdown

5. Replace data folder with your backup

6. Replace application with your backup

7. Replace database

8. Startup and confirm the downgrade

 

It may be worth noting, clear out temp files before backing up

 

My script to clear things

#!/usr/bin/env bash 

curl https://wiki-dev.liquidesign.co.za/status | grep RUNNING > /dev/null
IS_RUNNING="$([ $? -eq 0 ] && echo "Running" || echo "Stopped")"

if [[ $IS_RUNNING =~ "Stopped" ]];
then

       echo "Confluence is not running. Clearing cache folders."

       #Copy index out of data as we need some of the index content
       mkdir /apps/devwiki/index-tmp
       cp -r /apps/devwiki/data/index/* /apps/devconfluence/index-tmp

       # Clear out all folders
       rm -rf /apps/devwiki/data/bundled-plugins/*
       rm -rf /apps/devwiki/data/plugins-cache/*
       rm -rf /apps/devwiki/data/plugins-osgi-cache/*
       rm -rf /apps/devwiki/data/plugins-temp/*
       rm -rf /apps/devwiki/data/bundled-plugins_language/*
       rm -rf /apps/devwiki/data/index/*
       rm -rf /apps/devwiki/data/journal/*

       # Replace index folders
       cp -r /apps/devwiki/index-tmp/plugin /apps/devconfluence/data/index/plugin
       cp -r /apps/devwiki/index-tmp/edge /apps/devconfluence/data/index/edge
       cp -r /apps/devwiki/index-tmp/questions-edge /apps/devconfluence/data/index/questions-edge
       rm -rf /apps/devwiki/index-tmp

       # Remove tmp index
       rm -rf /apps/devwiki/index/

       # Clear working files
       rm -rf /apps/devwiki/confluence/temp/*
       rm -rf /apps/devwiki/synchrony_tmp/*
       rm -rf /apps/devwiki/confluence/work/Standalone/localhost/*

       echo "All done!"
else
  echo "Stop Confluence before executing this script."
  exit 1
fi

Like Dario likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events