Rake tasks

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.
Geo maintenance Geo-related maintenance.
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 maintenance LDAP-related tasks.
List repositoriesList all GitLab-managed Git repositories on disk.
Praefect Rake tasks Praefect-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.
Repository storageList and migrate existing projects and attachments from legacy storage to hashed storage.
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.
Webhooks 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:

# 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