Rake tasks

  • Tier: Free, Premium, Ultimate
  • Offering: GitLab Self-Managed

GitLab provides Rake tasks to assist you with common administration and operational processes.

You can perform GitLab Rake tasks by using:

Available Rake tasks

The following Rake tasks are available for use with GitLab:

TasksDescription
Access token expiration tasksBulk extend or remove expiration dates for access tokens.
Back up and restoreBack up, restore, and migrate GitLab instances between servers.
Clean upClean up unneeded items from GitLab instances.
DevelopmentTasks for GitLab contributors.
ElasticsearchMaintain Elasticsearch in a GitLab instance.
General maintenanceGeneral maintenance and self-check tasks.
GitHub importRetrieve and import repositories from GitHub.
Import large project exportsImport large GitLab project exports.
Incoming emailIncoming email-related tasks.
Integrity checksCheck the integrity of repositories, files, LDAP, and more.
LDAP maintenanceLDAP-related tasks.
Praefect Rake tasksPraefect-related tasks.
Project import/exportPrepare for project exports and imports.
Sidekiq job migrationMigrate Sidekiq jobs scheduled for future dates to a new queue.
Service Desk emailService Desk email-related tasks.
SMTP maintenanceSMTP-related tasks.
SPDX license list importImport a local copy of the SPDX license list for matching License approval policies.
Reset user passwordsReset user passwords using Rake.
Uploads migrateMigrate uploads between local storage and object storage.
Uploads sanitizeRemove EXIF data from images uploaded to earlier versions of GitLab.
Service DataGenerate and troubleshoot Service Ping.
User managementPerform user management tasks.
Webhook administrationMaintain project webhooks.
X.509 signaturesUpdate X.509 commit signatures, which can be useful if the certificate store changed.

To list all available Rake tasks:

Copy to clipboard
# Omnibus GitLab
sudo gitlab-rake -vT

# GitLab Helm chart
gitlab-rake -vT

# Installations from source
cd /home/git/gitlab
sudo -u git -H bundle exec rake -vT RAILS_ENV=production