Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Image Removed

...

I

...

recently

...

migrated

...

a

...

large

...

number

...

of

...

projects

...

(30)

...

from

...

Atlassian

...

Plugin Studio (no longer available) to Atlassian Cloud using a variety of techniques. The result is http://bobswift@atlassian.net.

...

While

...

I

...

am

...

happy

...

with

...

the

...

result,

...

getting

...

there

...

took

...

much

...

longer

...

than

...

expected!

...

There

...

were

...

a

...

number

...

of

...

problems

...

to

...

overcome

...

along

...

the

...

way

...

and

...

many

...

things

...

I

...

would

...

do

...

differently

...

if

...

I

...

needed

...

to

...

do

...

something

...

similar

...

again.

...

The

...

following

...

summarizes

...

what

...

I

...

would

...

recommend

...

for

...

others

...

with

...

a

...

similar

...

migration

...

to

...

do

...

(smile).

...

Some

...

of

...

the

...

steps

...

could

...

be

...

omitted

...

or

...

modified

...

for

...

your

...

situation. This

...

only

...

covers

...

migrating

...

Confluence

...

and

...

JIRA

...

data.

...


 

...


Automation

...

was

...

used

...

extensively

...

due

...

to

...

the

...

large

...

number

...

of

...

projects

...

to

...

migrate

...

and

...

the

...

need

...

to

...

perform

...

all

...

the

...

migrations

...

in

...

the

...

shortest

...

amount

...

of

...

time.

...

To

...

demonstrate,

...

we

...

will

...

use

...

2

...

projects

...

-

...

PA

...

and

...

PB

...

.

...

If

...

you

...

only

...

have

...

one

...

project,

...

you

...

can

...

simplify

...

the

...

steps

...

to

...

some

...

degree

...

and

...

in

...

some

...

cases

...

do

...

steps

...

manually

...

or

...

use

...

simplified

...

commands.

...

ACLI

...

was

...

used

...

extensively.

...

Atlassian

...

CLI

...

2.6.0-SNAPSHOT

...

or

...

above

...

is

...

required.

...

Specifically,

...

use

...

a

...

customized

...

version

...

of

...

the

...

atlassian.sh

...

or

...

atlassian.bat

...

to

...

make

...

it

...

easier. Figure

...

out

...

a

...

head

...

of

...

time

...

what

...

user

...

will

...

be

...

used

...

to

...

make

...

the

...

changes

...

in

...

the

...

OnDemand

...

instance.

...

I

...

recommend

...

creating

...

an

...

automation

...

user

...

id

...

(automation).

...


 

...


For

...

Confluence,

...

a

...

local

...

Confluence

...

3.5.13

...

(or

...

equivalent)

...

migration

...

installation

...

is

...

required

...

to

...

enable

...

the

...

restoring

...

of

...

data

...

to

...

the

...

OnDemand

...

instance.

...

The

...

local

...

instance

...

will

...

be

...

upgraded

...

to

...

4.1.7

...

after

...

the

...

studio

...

data

...

is

...

restored.

...

This

...

will

...

give

...

us

...

the

...

ability

...

to

...

save

...

and

...

restored

...

the

...

spaces

...

to

...

the

...

OnDemand

...

instance

...

because

...

it

...

is

...

at

...

roughly

...

the

...

same

...

release

...

level.

...

:= }
No Format
title
Customize
the
atlassian
command
for
Confluence
if [ "$application" = "confluence-studio" ]; then
    string="confluence-cli-2.6.0-SNAPSHOT.jar --server https://studio.plugins.atlassian.com/wiki --user xxxx --password xxxx"
elif [ "$application" = "confluence-ondemand" ]; then
    string="confluence-cli-2.6.0-SNAPSHOT.jar --server https://xxxx.atlassian.net/wiki --user xxxx --password xxxx"
elif [ "$application" = "confluence-migration" ]; then
    string="confluence-cli-2.6.0-SNAPSHOT.jar --server https://localhost:8121 --user automation --password xxxx"
{noformat}
 
{noformat:title=Customize the atlassian command for JIRA}
No Format
titleCustomize the atlassian command for JIRA
if [ "$application" = "jira-studio" ]; then
    string="jira-cli-2.6.0-SNAPSHOT.jar --server https://studio.plugins.atlassian.com --user xxxx --password xxxx"
elif [ "$application" = "jira-ondemand" ]; then
    string="jira-cli-2.6.0-SNAPSHOT.jar --server https://xxxx.atlassian.net --user xxxx --password xxxx"
{noformat}
h3. Steps to Prevent Changes on Studio
Once you start the migration process, you do not want changes taking place on the old system. 
# Prevent Confluence pages from being created, updated, or commented on
#- General users don't have much permission anyway. Only administrators and a few special cases are allowed to edit - ignore that or handle manually.
#- Remove *comment* permission from *users* group
{noformat}

Steps to Prevent Changes on Studio

Once you start the migration process, you do not want changes taking place on the old system.

  1. Prevent Confluence pages from being created, updated, or commented on
    • General users don't have much permission anyway. Only administrators and a few special cases are allowed to edit - ignore that or handle manually.
    • Remove comment permission from users group

      No Format
      atlassian confluence-studio -a runFromList --common "-a removePermissions --space @entry@ --group users --permissions comment" --continue --list "PA, PB"
      

...

  1. Prevent JIRA issues from being created, updated, or commented on by switching users (group) role from users to observers
    • Give Observers role to users group - no harm in doing this early

      No Format
      atlassian jira-studio -a runFromList --common "-a addProjectRoleActors --project @entry@ --group users --role Observers" --continue --list "PA PB"
      

...

    • Remove Users role from users group

      No Format
      atlassian jira-studio -a runFromList --common "-a removeProjectRoleActors --project @entry@ --group users --role Users" --continue --list "PA, PB"
      

...

    • The default permission scheme gives users group authority not just role authority to create, update, ... issues!!!

...

    • So,

...

    • you

...

    • need

...

    • to

...

    • change

...

    • all

...

    • projects

...

    • to

...

    • use

...

    • a

...

    • different

...

    • permission

...

    • scheme

...

    • that

...

    • is

...

    • strictly

...

    • role

...

    • based.

...

    • Developer

...

    • Relations

...

    • created

...

    • this

...

    • specifically

...

    • for

...

    • this

...

    • purpose

...

    • (thanks

...

    • Jonathan!).

...

    • There

...

    • is

...

    • no

...

    • harm

...

    • in

...

    • doing

...

    • this

...

    • change

...

    • well

...

    • before

...

    • migration.

...

      1. Update

...

      1. all

...

      1. projects

...

      1. to

...

      1. the

...

      1. role

...

      1. based

...

      1. permission

...

      1. scheme

...

      1. No Format

...

      1. atlassian jira-studio -a runFromList --common "-a updateProject --project @entry@ --permissionScheme \"Role based\" " --continue --list "PA, PB"
        

...

Steps to Capture Data from Studio

As part of the migration, it is important to migrate user ids as well (especially for JIRA!) in order to preserve who created issues or content. This will enable the original user to retain ownership as much as possible. This can be done easily with Confluence but is significantly more difficult for JIRA. JIRA limitations make it impossible to retain certain information using an external migration approach. In our case, the limitations were acceptable.

  1. Confluence data
    1. Export participants data (userId, full name, email)
      This allowed user ids to be exported.

      No Format
      titleThis can take time for larger spaces or a large number of spaces/projects
      atlassian confluence-studio -a runFromList --common "-a exportData --space @entry@ --file participants-confluence.txt --append" --list "PA, PB"
      

...

    1. Export space

      No Format
      atlassian confluence-studio -a runFromList --common "-a exportSpace --space @entry@ --file @entry@-space.zip" --list "pa, pb"
      

...

  1. JIRA data
    1. Export participants data (userId,

...

    1. full

...

    1. name,

...

    1. email)

...

    1. -

...

    1. only

...

    1. need

...

    1. to

...

    1. do

...

    1. this

...

    1. once

...

    1. for

...

    1. all

...

    1. projects

...

    1. No Format

...

    1. title

...

    1. This

...

    1. can

...

    1. take

...

    1. time

...

    1. for

...

    1. larger

...

    1. projects

...

    1. or

...

    1. a

...

    1. large

...

    1. number

...

    1. of

...

    1. projects

...

    1. atlassian jira-studio -a exportData --exportType participants --file participants.txt --search "project in (PA, PB)"
      

...

    1. Info
      titleIncomplete

      Unfortunately, studio prevents access to the email address for users (JIRA only, Confluence works ok!).

...

    1. You

...

    1. will

...

    1. need

...

    1. help

...

    1. from

...

    1. Developer

...

    1. relations

...

    1. to

...

    1. get

...

    1. the

...

    1. email

...

    1. addresses

...

    1. for

...

    1. your

...

    1. JIRA

...

    1. participants.

...

    1. Export project data - versions and components

      No Format
      atlassian jira-studio -a runFromList --common "-a exportData --project @entry@ --file @entry@.txt" --list "pa, pb"
      

...

    1. Get issues

      No Format
      atlassian jira-studio -a runFromList --common "-a getIssueList --project @entry@ --file @entry@-issues.txt --list "pa, pb"
      

...

    1. Get comments

      No Format
      titleRun for each project
      atlassian jira-studio -a runFromIssueList --project pa --common "-a getCommentList --issue @issue@ --outputFormat 2 --append --file pa-comments.txt"
      

...

    1. Get voters

      No Format
      titleRun for each project
      atlassian jira-studio -a runFromIssueList --project pa --common "-a getVoterList --issue @issue@ --outputFormat 2 --append --file pa-voters.txt"
      

...

    1. Get watchers

      No Format
      atlassian jira-studio -a runFromIssueList --project pa --common "-a getWatchersList --issue @issue@ --outputFormat 2 --append --file pa-watchers.txt"
      

...

    1. Attachments
      Attachments will be handled by script by retrieving them one at a time and adding them to the migrated issue directly

Steps to Restore Data to OnDemand instance

Script is used to do most of this for each project in parallel.

  1. Add users - important to retain JIRA reporters and comment authors for both JIRA and Confluence

    No Format
    atlassian jira-ondemand -a run --file participants.txt
    atlassian jira-ondemand -a run --file participants-confluence.txt
    

...

  1. Confluence spaces
    1. Copy *.zip

...

    1. to

...

    1. Confluence

...

    1. home/restore

...

    1. directory

...

    1. of

...

    1. a

...

    1. local

...

    1. Confluence

...

    1. 3.5.13

...

    1. instance

...

    1. Restore

...

    1. exports

...

    1. to

...

    1. local

...

    1. instance

...

    1. No Format

...

    1. atlassian confluence-migration -a runFromList --common "-a restoreExport --file @entry@-space.zip" --continue --list "pa, pb"
      

...

    1. Upgrade Confluence 3.5.13

...

    1. to

...

    1. Confluence

...

    1. version

...

    1. <=

...

    1. 4.1.7

...

    1. (OnDemand

...

    1. level)

...

    1. Export

...

    1. spaces

...

    1. (now

...

    1. in

...

    1. OnDemand

...

    1. compatible

...

    1. release

...

    1. format)

...

    1. No Format

...

    1. atlassian confluence-migration -a runFromList --common "-a exportSpace --space @entry@ --file @entry@-space-41.zip
      

...

    1. restore spaces to OnDemand instance using UI (on demand has unique restore support)
      • link the space to the existing JIRA project with the same key (this didn't seem to work though - OnDemand bug ?)
  1. JIRA projects - create project and add versions and components

    No Format
    atlassian jira-ondemand -a runFromList --common "-a run --file @entry@.txt" --continue --list "pa, pb"
    

...

  1. Restrict notifications - no notifications while JIRA data is being recreated. Create a No notification notification scheme to use for your on demand instance.

    No Format
    atlassian jira-ondemand -a runFromList --common "-a updateProject --project @entry@ --notificationScheme \"No notifications\" " --continue --list "pa, pb"
    

...

  1. JIRA issues
    • run issue create script
    • match JIRA keys
    • progress issues to correct state
  2. JIRA comments
    • run comment create script
  3. JIRA voters
    • run comment create script
  4. JIRA watchers
    • run comment create script
  5. JIRA attachments
    • run attachment copy script
  6. Restore notifications

    No Format
    atlassian jira-ondemand -a runFromList --common "-a updateProject --project @entry@ --notificationScheme \"Default Notification Scheme\"" --continue --list "pa, pb"
    

...

Steps to Redirect Users

As a service to your users, you can redirect users from the old information to the new information.

  1. Update Studio Confluence pages with redirect link

    No Format
    titleFor each space
    atlassian confluence-studio -a runFromPageList --space pa --common "-a updatePage --space @space@ --title @title@ --content "... redirect macro ..."
    

...

  1. Add a comment to Studio JIRA issues with link to equivalent issue

    No Format
    atlassian jira-studio -a runFromIssueList --project pa --common "-a addComment --issue @issue@ --comment "Issue migrated to [@issue@|bobswift@atlassian.com]"

...

  1.