2019-09-30 21:07:59 +05:30
|
|
|
# Geo Rake Tasks **(PREMIUM ONLY)**
|
2019-07-31 22:56:46 +05:30
|
|
|
|
2020-11-24 15:15:51 +05:30
|
|
|
The following Rake tasks are for [Geo installations](../geo/index.md).
|
2020-05-24 23:13:21 +05:30
|
|
|
|
2019-07-31 22:56:46 +05:30
|
|
|
## Git housekeeping
|
|
|
|
|
2019-12-21 20:55:43 +05:30
|
|
|
There are few tasks you can run to schedule a Git housekeeping to start at the
|
2020-05-24 23:13:21 +05:30
|
|
|
next repository sync in a **secondary** node:
|
2019-07-31 22:56:46 +05:30
|
|
|
|
|
|
|
### Incremental Repack
|
|
|
|
|
|
|
|
This is equivalent of running `git repack -d` on a _bare_ repository.
|
|
|
|
|
|
|
|
**Omnibus Installation**
|
|
|
|
|
2020-03-13 15:44:24 +05:30
|
|
|
```shell
|
2019-07-31 22:56:46 +05:30
|
|
|
sudo gitlab-rake geo:git:housekeeping:incremental_repack
|
|
|
|
```
|
|
|
|
|
|
|
|
**Source Installation**
|
|
|
|
|
2020-03-13 15:44:24 +05:30
|
|
|
```shell
|
2019-07-31 22:56:46 +05:30
|
|
|
sudo -u git -H bundle exec rake geo:git:housekeeping:incremental_repack RAILS_ENV=production
|
|
|
|
```
|
|
|
|
|
|
|
|
### Full Repack
|
|
|
|
|
2019-09-30 21:07:59 +05:30
|
|
|
This is equivalent of running `git repack -d -A --pack-kept-objects` on a
|
2019-07-31 22:56:46 +05:30
|
|
|
_bare_ repository which will optionally, write a reachability bitmap index
|
|
|
|
when this is enabled in GitLab.
|
|
|
|
|
|
|
|
**Omnibus Installation**
|
|
|
|
|
2020-03-13 15:44:24 +05:30
|
|
|
```shell
|
2019-07-31 22:56:46 +05:30
|
|
|
sudo gitlab-rake geo:git:housekeeping:full_repack
|
|
|
|
```
|
|
|
|
|
|
|
|
**Source Installation**
|
|
|
|
|
2020-03-13 15:44:24 +05:30
|
|
|
```shell
|
2019-07-31 22:56:46 +05:30
|
|
|
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-03-13 15:44:24 +05:30
|
|
|
```shell
|
2019-07-31 22:56:46 +05:30
|
|
|
sudo gitlab-rake geo:git:housekeeping:gc
|
|
|
|
```
|
|
|
|
|
|
|
|
**Source Installation**
|
|
|
|
|
2020-03-13 15:44:24 +05:30
|
|
|
```shell
|
2019-07-31 22:56:46 +05:30
|
|
|
sudo -u git -H bundle exec rake geo:git:housekeeping:gc RAILS_ENV=production
|
|
|
|
```
|
2019-12-04 20:38:33 +05:30
|
|
|
|
|
|
|
## Remove orphaned project registries
|
|
|
|
|
|
|
|
Under certain conditions your project registry can contain obsolete records, you
|
2020-04-22 19:07:51 +05:30
|
|
|
can remove them using the Rake task `geo:run_orphaned_project_registry_cleaner`:
|
2019-12-04 20:38:33 +05:30
|
|
|
|
|
|
|
**Omnibus Installation**
|
|
|
|
|
2020-03-13 15:44:24 +05:30
|
|
|
```shell
|
2019-12-04 20:38:33 +05:30
|
|
|
sudo gitlab-rake geo:run_orphaned_project_registry_cleaner
|
|
|
|
```
|
|
|
|
|
|
|
|
**Source Installation**
|
|
|
|
|
2020-03-13 15:44:24 +05:30
|
|
|
```shell
|
2019-12-04 20:38:33 +05:30
|
|
|
sudo -u git -H bundle exec rake geo:run_orphaned_project_registry_cleaner RAILS_ENV=production
|
|
|
|
```
|