debian-mirror-gitlab/doc/administration/raketasks/geo.md

84 lines
2 KiB
Markdown
Raw Normal View History

2021-01-29 00:20:46 +05:30
---
2022-07-23 23:45:48 +05:30
stage: Systems
2021-01-29 00:20:46 +05:30
group: Geo
2021-02-22 17:27:13 +05:30
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#assignments
2021-01-29 00:20:46 +05:30
---
2021-03-11 19:13:27 +05:30
# Geo Rake Tasks **(PREMIUM SELF)**
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).
2022-03-02 08:16:31 +05:30
See also [troubleshooting Geo](../geo/replication/troubleshooting.md) for additional Geo Rake tasks.
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
2022-07-23 23:45:48 +05:30
_bare_ repository which optionally, writes a reachability bitmap index
2019-07-31 22:56:46 +05:30
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
```