Skip to content

Export users to CSV file

Created by: bbodenmiller

This PR adds the ability for a system admin to export a list of users and basic account details via a rake task. The output will be written to users.csv in the configured backup folder.

# use this command if you've installed GitLab with the Omnibus package
sudo gitlab-rake gitlab:backup:users

# if you've installed GitLab from source
sudo -u git -H bundle exec rake gitlab:backup:users RAILS_ENV=production

The motive for adding this feature is so that system administrators can keep a list of users & emails separate from the GitLab installation in case of prolonged downtime. Additionally this allows admins to quickly verify some account details (project limit, can create group, etc.) not yet easily bulk verified in the UI.

As this is related to backups it was added to backup rake file. At this time the generated file is not included in the backup tar file nor generated when gitlab:backup:create is run. In the future it may be valuable stored in the backup tar file however at this time the folks I have spoke with see more value in having users.csv generated and stored separately.

Merge request reports

Loading