2019-07-08 04:50:38 -04:00
|
|
|
# Geo Rake Tasks **(PREMIUM ONLY)**
|
2019-05-05 11:21:25 -04:00
|
|
|
|
2020-04-27 02:09:51 -04:00
|
|
|
The following Rake tasks are for [Geo installations](../geo/replication/index.md).
|
|
|
|
|
2019-05-05 11:21:25 -04:00
|
|
|
## Git housekeeping
|
|
|
|
|
2019-09-26 02:06:27 -04:00
|
|
|
There are few tasks you can run to schedule a Git housekeeping to start at the
|
2020-04-27 02:09:51 -04:00
|
|
|
next repository sync in a **secondary** node:
|
2019-05-05 11:21:25 -04:00
|
|
|
|
|
|
|
### Incremental Repack
|
|
|
|
|
|
|
|
This is equivalent of running `git repack -d` on a _bare_ repository.
|
|
|
|
|
|
|
|
**Omnibus Installation**
|
|
|
|
|
2020-01-30 10:09:15 -05:00
|
|
|
```shell
|
2019-05-05 11:21:25 -04:00
|
|
|
sudo gitlab-rake geo:git:housekeeping:incremental_repack
|
|
|
|
```
|
|
|
|
|
|
|
|
**Source Installation**
|
|
|
|
|
2020-01-30 10:09:15 -05:00
|
|
|
```shell
|
2019-05-05 11:21:25 -04:00
|
|
|
sudo -u git -H bundle exec rake geo:git:housekeeping:incremental_repack RAILS_ENV=production
|
|
|
|
```
|
|
|
|
|
|
|
|
### Full Repack
|
|
|
|
|
2019-07-12 04:15:38 -04:00
|
|
|
This is equivalent of running `git repack -d -A --pack-kept-objects` on a
|
2019-05-05 11:21:25 -04:00
|
|
|
_bare_ repository which will optionally, write a reachability bitmap index
|
|
|
|
when this is enabled in GitLab.
|
|
|
|
|
|
|
|
**Omnibus Installation**
|
|
|
|
|
2020-01-30 10:09:15 -05:00
|
|
|
```shell
|
2019-05-05 11:21:25 -04:00
|
|
|
sudo gitlab-rake geo:git:housekeeping:full_repack
|
|
|
|
```
|
|
|
|
|
|
|
|
**Source Installation**
|
|
|
|
|
2020-01-30 10:09:15 -05:00
|
|
|
```shell
|
2019-05-05 11:21:25 -04:00
|
|
|
sudo -u git -H bundle exec rake geo:git:housekeeping:full_repack RAILS_ENV=production
|
|
|
|
```
|
|
|
|
|
|
|
|
### GC
|
|
|
|
|
|
|
|
This is equivalent of running `git gc` on a _bare_ repository, optionally writing
|
|
|
|
a reachability bitmap index when this is enabled in GitLab.
|
|
|
|
|
|
|
|
**Omnibus Installation**
|
|
|
|
|
2020-01-30 10:09:15 -05:00
|
|
|
```shell
|
2019-05-05 11:21:25 -04:00
|
|
|
sudo gitlab-rake geo:git:housekeeping:gc
|
|
|
|
```
|
|
|
|
|
|
|
|
**Source Installation**
|
|
|
|
|
2020-01-30 10:09:15 -05:00
|
|
|
```shell
|
2019-05-05 11:21:25 -04:00
|
|
|
sudo -u git -H bundle exec rake geo:git:housekeeping:gc RAILS_ENV=production
|
|
|
|
```
|
2019-09-13 09:26:31 -04:00
|
|
|
|
|
|
|
## Remove orphaned project registries
|
|
|
|
|
|
|
|
Under certain conditions your project registry can contain obsolete records, you
|
2020-03-31 08:08:09 -04:00
|
|
|
can remove them using the Rake task `geo:run_orphaned_project_registry_cleaner`:
|
2019-09-13 09:26:31 -04:00
|
|
|
|
|
|
|
**Omnibus Installation**
|
|
|
|
|
2020-01-30 10:09:15 -05:00
|
|
|
```shell
|
2019-09-13 09:26:31 -04:00
|
|
|
sudo gitlab-rake geo:run_orphaned_project_registry_cleaner
|
|
|
|
```
|
|
|
|
|
|
|
|
**Source Installation**
|
|
|
|
|
2020-01-30 10:09:15 -05:00
|
|
|
```shell
|
2019-09-13 09:26:31 -04:00
|
|
|
sudo -u git -H bundle exec rake geo:run_orphaned_project_registry_cleaner RAILS_ENV=production
|
|
|
|
```
|