diff options
Diffstat (limited to 'doc/administration/housekeeping.md')
-rw-r--r-- | doc/administration/housekeeping.md | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/doc/administration/housekeeping.md b/doc/administration/housekeeping.md index 8f369a05fbf..9668b7277c2 100644 --- a/doc/administration/housekeeping.md +++ b/doc/administration/housekeeping.md @@ -4,9 +4,10 @@ group: Distribution 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 --- -# Housekeeping +# Housekeeping **(FREE)** -> [Introduced](https://gitlab.com/gitlab-org/gitlab-foss/-/issues/3041) in GitLab 8.4. +GitLab supports and automates housekeeping tasks within your current repository, +such as compressing file revisions and removing unreachable objects. ## Automatic housekeeping @@ -25,8 +26,8 @@ For example in the following scenario a `git repack -d` will be executed: - Git GC period = `200` - Full repack period = `50` -When the `pushes_since_gc` value is 50 a `repack -A -d --pack-kept-objects` will run, similarly when -the `pushes_since_gc` value is 200 a `git gc` will be run. +When the `pushes_since_gc` value is 50 a `repack -A -d --pack-kept-objects` runs, similarly when +the `pushes_since_gc` value is 200 a `git gc` runs. - `git gc` ([man page](https://mirrors.edge.kernel.org/pub/software/scm/git/docs/git-gc.html)) runs a number of housekeeping tasks, such as compressing file revisions (to reduce disk space and increase performance) @@ -34,12 +35,14 @@ the `pushes_since_gc` value is 200 a `git gc` will be run. `git add`. - `git repack` ([man page](https://mirrors.edge.kernel.org/pub/software/scm/git/docs/git-repack.html)) re-organize existing packs into a single, more efficient pack. -Housekeeping will also [remove unreferenced LFS files](../raketasks/cleanup.md#remove-unreferenced-lfs-files) +Housekeeping also [removes unreferenced LFS files](../raketasks/cleanup.md#remove-unreferenced-lfs-files) from your project on the same schedule as the `git gc` operation, freeing up storage space for your project. -You can find this option under your project's **Settings > General > Advanced**. +To manually start the housekeeping process: -![Housekeeping settings](img/housekeeping_settings.png) +1. In your project, go to **Settings > General**. +1. Expand the **Advanced** section. +1. Select **Run housekeeping**. ## How housekeeping handles pool repositories @@ -56,4 +59,9 @@ This is the current call stack by which it is invoked: 1. `Gitaly::FetchIntoObjectPoolRequest` To manually invoke it from a Rails console, if needed, you can call `project.pool_repository.object_pool.fetch`. -This is a potentially long-running task, though Gitaly will timeout in about 8 hours. +This is a potentially long-running task, though Gitaly times out in about 8 hours. + +WARNING: +Do not run `git prune` or `git gc` in pool repositories! This can +cause data loss in "real" repositories that depend on the pool in +question. |