Help us learn about your current experience with the documentation. Take the survey.

Rake 任务

  • Tier: Free, Premium, Ultimate
  • 产品类型: GitLab Self-Managed

GitLab 提供了 Rake 任务,以帮助您完成常见的管理和运维流程。

除非特定任务的文档另有说明,否则所有 Rake 任务都必须在 Rails 节点上运行。

您可以通过以下方式执行 GitLab Rake 任务:

可用的 Rake 任务

以下 Rake 任务可用于 GitLab:

Tasks Description
Access token expiration tasks 批量延长或移除访问令牌的过期日期。
Back up and restore 在服务器之间备份、恢复和迁移 GitLab 实例。
Clean up 从 GitLab 实例中清理不需要的项目。
Development 适用于 GitLab 贡献者的任务。更多信息,请参阅开发文档。
Elasticsearch 维护 GitLab 实例中的 Elasticsearch。
General maintenance 常规维护和自检任务。
GitHub import 从 GitHub 获取并导入仓库。
Import large project exports 导入大型的 GitLab 项目导出文件
Incoming email 与接收邮件相关的任务。
Integrity checks 检查仓库、文件、LDAP 等的完整性。
LDAP maintenance LDAP 相关的任务。
Password 密码管理任务。
Praefect Rake tasks Praefect 相关的任务。
Project import/export 项目导出和导入做准备。
Sidekiq job migration 将计划在未来日期执行的 Sidekiq 任务迁移到新队列。
Service Desk email 与服务台邮件相关的任务。
SMTP maintenance 与 SMTP 相关的任务。
SPDX license list import 导入 SPDX 许可证列表 的本地副本,用于匹配许可证批准策略
Reset user passwords 使用 Rake 重置用户密码。
Uploads migrate 在上传文件本地存储和对象存储之间迁移。
Uploads sanitize 从上传到旧版 GitLab 的图片中移除 EXIF 数据。
Service Data 生成和排查 Service Ping。更多信息,请参阅 Service Ping 开发文档。
User management 执行用户管理任务。
Webhook administration 维护项目 Webhook。
X.509 signatures 更新 X.509 提交签名,在证书存储更改时可能很有用。

要列出所有可用的 Rake 任务:

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