Skip to end of banner
Go to start of banner

How to Copy Users to Another Instance

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Description

This describes steps to use the JIRA CLI to copy users from one instance to another for either Server or Cloud instances. Copying all users or all user in a group to an new instance can be automated without scripting. If you need to select specific users, some manual or scripted steps may be needed to do the selection. Treat the techniques described here as examples that can be adjusted based on specific requirements.

Requirements

  • This requires CLI client version 7.0 or higher.

Steps


StepActionExample
1Export users from original instancegetUserList
Action
jira -a getUserList --outputFormat 999 --group jira-users --columns user,name,email,groups --file users.csv

Result File

users.csv
"User","Name","Email","Groups"
"admin","Administrator","admin@examplegear.com","jira-users,jira-administrators"
"bob","Bob Swift","bob@examplegear.com","jira-users,jira-administrators"
...
2Modify csv file so that the column names match parameter names for the addUser actioncopyCsv
csv -a copyCsv --sourceFile users.csv --file addUsers.csv --findReplace "User:userId,Name:userFullName,Email:userEmail,Groups:group"

Result file

addUsers.csv
"userId","userFullName","userEmail","group"
"admin","Administrator","admin@examplegear.com","jira-users,jira-administrators"
"bob","Bob Swift","bob@examplegear.com","jira-users,jira-administrators"
...
3Import usersrunFromCsv
--action runFromCsv --file addUsers.csv --common "-a addUser --continue" --continue

Result

...
Run: -a addUser --userId "admin" --userFullName "Administrator" --userEmail "admin@examplegear.com" --group "jira-users,jira-administrators"

User 'admin' added.
...
Run: -a addUser --userId "bob" --userFullName "Bob Swift" --userEmail "bob@examplegear.com" --group "jira-users,jira-administrators"

User 'bob' added.
....



  • No labels