summaryrefslogtreecommitdiff
path: root/doc/raketasks/cleanup.md
blob: 8fbcbb983e9edfd8f9e8b3d32c2fb0b33e15a7dd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# Cleanup

## Remove garbage from filesystem. Important! Data loss!

Remove namespaces(dirs) from `/home/git/repositories` if they don't exist in GitLab database.

```
# omnibus-gitlab
sudo gitlab-rake gitlab:cleanup:dirs

# installation from source
bundle exec rake gitlab:cleanup:dirs RAILS_ENV=production
```

Rename repositories from `/home/git/repositories` if they don't exist in GitLab database.
The repositories get a `+orphaned+TIMESTAMP` suffix so that they cannot block new repositories from being created.

```
# omnibus-gitlab
sudo gitlab-rake gitlab:cleanup:repos

# installation from source
bundle exec rake gitlab:cleanup:repos RAILS_ENV=production
```