514.md 2.1 KB
Newer Older
Lab机器人's avatar
readme  
Lab机器人 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81
# Geo Rake Tasks

> 原文:[https://docs.gitlab.com/ee/administration/raketasks/geo.html](https://docs.gitlab.com/ee/administration/raketasks/geo.html)

*   [Git housekeeping](#git-housekeeping)
    *   [Incremental Repack](#incremental-repack)
    *   [Full Repack](#full-repack)
    *   [GC](#gc)
*   [Remove orphaned project registries](#remove-orphaned-project-registries)

# Geo Rake Tasks[](#geo-rake-tasks-premium-only "Permalink")

以下 Rake 任务适用于[Geo 安装](../geo/replication/index.html) .

## Git housekeeping[](#git-housekeeping "Permalink")

您可以执行一些任务来调度 Git 内务处理,以从**辅助**节点中的下一个存储库同步开始:

### Incremental Repack[](#incremental-repack "Permalink")

这等效于在*裸*仓库上运行`git repack -d` .

**全部安装**

```
sudo gitlab-rake geo:git:housekeeping:incremental_repack 
```

**源安装**

```
sudo -u git -H bundle exec rake geo:git:housekeeping:incremental_repack RAILS_ENV=production 
```

### Full Repack[](#full-repack "Permalink")

这等效于在*裸*仓库上运行`git repack -d -A --pack-kept-objects` ,可以选择在 GitLab 中启用它时写入可达性位图索引.

**全部安装**

```
sudo gitlab-rake geo:git:housekeeping:full_repack 
```

**源安装**

```
sudo -u git -H bundle exec rake geo:git:housekeeping:full_repack RAILS_ENV=production 
```

### GC[](#gc "Permalink")

这等效于在*裸*仓库上运行`git gc` ,如果在 GitLab 中启用了此功能,则可以选择编写可达性位图索引.

**全部安装**

```
sudo gitlab-rake geo:git:housekeeping:gc 
```

**源安装**

```
sudo -u git -H bundle exec rake geo:git:housekeeping:gc RAILS_ENV=production 
```

## Remove orphaned project registries[](#remove-orphaned-project-registries "Permalink")

在某些情况下,您的项目注册表可能包含过时的记录,您可以使用 Rake 任务`geo:run_orphaned_project_registry_cleaner`删除它们:

**全部安装**

```
sudo gitlab-rake geo:run_orphaned_project_registry_cleaner 
```

**源安装**

```
sudo -u git -H bundle exec rake geo:run_orphaned_project_registry_cleaner RAILS_ENV=production 
```