debian-mirror-gitlab/doc/administration/geo/replication/remove_geo_site.md

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

61 lines
1.8 KiB
Markdown
Raw Normal View History

2021-04-29 21:17:54 +05:30
---
2022-07-23 23:45:48 +05:30
stage: Systems
2021-04-29 21:17:54 +05:30
group: Geo
2022-11-25 23:54:43 +05:30
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments
2021-04-29 21:17:54 +05:30
type: howto
---
# Removing secondary Geo sites **(PREMIUM SELF)**
**Secondary** sites can be removed from the Geo cluster using the Geo administration page of the **primary** site. To remove a **secondary** site:
2022-10-11 01:57:18 +05:30
1. On the top bar, select **Main menu > Admin**.
2021-09-04 01:27:46 +05:30
1. On the left sidebar, select **Geo > Nodes**.
2021-04-29 21:17:54 +05:30
1. Select the **Remove** button for the **secondary** site you want to remove.
1. Confirm by selecting **Remove** when the prompt appears.
2023-01-13 00:05:48 +05:30
After the **secondary** site is removed from the Geo administration page, you must
stop and uninstall this site. For each node on your secondary Geo site:
2021-04-29 21:17:54 +05:30
1. Stop GitLab:
```shell
sudo gitlab-ctl stop
```
1. Uninstall GitLab:
```shell
# Stop gitlab and remove its supervision process
sudo gitlab-ctl uninstall
# Debian/Ubuntu
sudo dpkg --remove gitlab-ee
# Redhat/Centos
sudo rpm --erase gitlab-ee
```
2023-01-13 00:05:48 +05:30
When GitLab has been uninstalled from each node on the **secondary** site, the replication slot must be dropped from the **primary** site's database as follows:
2021-04-29 21:17:54 +05:30
1. On the **primary** site's database node, start a PostgreSQL console session:
```shell
sudo gitlab-psql
```
NOTE:
2022-07-23 23:45:48 +05:30
Using `gitlab-rails dbconsole` does not work, because managing replication slots requires superuser permissions.
2021-04-29 21:17:54 +05:30
1. Find the name of the relevant replication slot. This is the slot that is specified with `--slot-name` when running the replicate command: `gitlab-ctl replicate-geo-database`.
```sql
SELECT * FROM pg_replication_slots;
```
1. Remove the replication slot for the **secondary** site:
```sql
SELECT pg_drop_replication_slot('<name_of_slot>');
```