Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

What is the command to export users from PostgreSQL to csv file? (version 6.3)

Adi Mesika January 3, 2015

Hi,

I want to export all my user list to a CSV file (I want to remove them to another JIRA instance - but I need only the users).

I use PostgreSQL and my JIRA version is 6.3 (+ JIRA agile).

What is the command to do it?

 

Thanks in advance,

Adi

2 answers

1 vote
David Simpson • AppFusions • v3
Contributor
January 4, 2015

Try something like...

COPY cwd_user TO '/tmp/cwd_users.csv' DELIMITER ',' CSV HEADER;

See the Postgres documentation for more.

0 votes
Nic Brough -Adaptavist-
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.
January 4, 2015

Select * from cwd_user in the database and reformat the output as CSV - but remember you can't just import it into another JIRA from that.

Adi Mesika January 4, 2015

Yes, I've already tried it, but it raise error that table "cwd_user" doesn't exist.

Why can't I import it to another JIRA instance?

So what is the right way to move all the users list from one instance to another (just the user list)?

 

Thanks

Nic Brough -Adaptavist-
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.
January 4, 2015

There is no "right way" we can define without knowing what user directory type you are using. Even then, some don't have a way to move users - you'll need to create them from scratch no matter what. Most forms of user directory simply don't have "import users" as well, that's why I say you won't be able to use simple raw CSV If you have no cwd_user table in the database then you're either on a really old Jira, or you're using something totally outside Jira to handle users. Could you confirm your version of Jira and what user directory you are using? (Internal, Crowd, AD, something else?)

Adi Mesika January 4, 2015

Yes. The version is 6.3 and all users created directly in Jira, no connection to AD or any other external service. Thanks

Nic Brough -Adaptavist-
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.
January 5, 2015

Ok, then you need to find the cwd_user table. That's what the internal user directory uses - your JIRA won't work without it.

Suggest an answer

Log in or Sign up to answer
TAGS
atlassian, mindful member, mindful member badge, atlassian community, community kudos, community giveaway, atlassian swag, community values, empathy and kindness, badge challenge, atlassian learning, community engagement, swag giveaway

Earn a Badge, Win a Prize 🎁

Earning the Mindful Member badge proves you know how to lead with kindness, plus it enters you into a giveaway for exclusive Atlassian swag. Take the quiz, grab the badge, and comment on our announcement article to spread the good vibes!

Start here
AUG Leaders

Atlassian Community Events