/
How to copy users to another instance
How to copy users to another instance
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 users in a group to a 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.
- Customize your Atlassian start script to include access to both JIRA instances (jira1 and jira2 in this example) and also to the CSV CLI. See Atlassian CLI Start Script for more information.
Steps
Step | Action | Example | |
---|---|---|---|
1 | Export users from original instance. | getUserList | Action atlassian jira1 -a getUserList --outputFormat 999 --group jira-users --columns user,name,email,groups --file users.csv Result Fileusers.csv "User","Name","Email","Groups" "admin","Administrator","admin@examplegear.com","jira-users,jira-administrators" "bob","Bob Swift","bob@examplegear.com","jira-users,jira-administrators" ... |
2 | Modify csv file so that the column names match parameter names for the addUser action. | copyCsv | atlassian csv -a copyCsv --sourceFile users.csv --file addUsers.csv --findReplace "User:userId,Name:userFullName,Email:userEmail,Groups:group" Result fileaddUsers.csv "userId","userFullName","userEmail","group" "admin","Administrator","admin@examplegear.com","jira-users,jira-administrators" "bob","Bob Swift","bob@examplegear.com","jira-users,jira-administrators" ... |
3 | Import users to new instance. | runFromCsv | atlassian jira2 --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. .... |
, multiple selections available,
Related content
Adding users in bulk to ServiceDesk organizations using CLI
Adding users in bulk to ServiceDesk organizations using CLI
More like this
How to import data exported from another instance with Jira CLI
How to import data exported from another instance with Jira CLI
More like this
How to Bulk Update User Information
How to Bulk Update User Information
More like this
addUser
Read with this
Create bulk users in Jira using Jira Command Line Interface (CLI)
Create bulk users in Jira using Jira Command Line Interface (CLI)
More like this
Move projects from Jira Cloud to Cloud
Move projects from Jira Cloud to Cloud
More like this