Skip to content

Commit 0e22c7a

Browse files
i80andkay-kim
authored andcommitted
DOCS-3547: Document MongoDB uninstallation
Signed-off-by: kay <[email protected]>
1 parent ad1e167 commit 0e22c7a

18 files changed

+218
-1
lines changed

source/includes/fact-uninstall.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
To completely remove MongoDB from a system, you must remove the MongoDB
2+
applications themselves, the configuration files, and any directories containing
3+
data and logs. The following section guides you through the necessary steps.
4+
5+
.. warning::
6+
This process will *completely* remove MongoDB, its configuration, and *all*
7+
databases. This process is not reversible, so ensure that all of your
8+
configuration and data is backed up before proceeding.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
stepnum: 1
2+
source:
3+
file: steps-uninstall-mongodb-on-linux.yaml
4+
ref: stop-mongodb
5+
---
6+
stepnum: 2
7+
source:
8+
file: steps-uninstall-mongodb-on-linux.yaml
9+
ref: remove-packages
10+
replacement:
11+
command: "sudo apt-get purge mongodb-enterprise*"
12+
---
13+
stepnum: 3
14+
source:
15+
file: steps-uninstall-mongodb-on-linux.yaml
16+
ref: remove-db
17+
...
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
stepnum: 1
2+
source:
3+
file: steps-uninstall-mongodb-on-linux.yaml
4+
ref: stop-mongodb
5+
---
6+
stepnum: 2
7+
source:
8+
file: steps-uninstall-mongodb-on-linux.yaml
9+
ref: remove-packages
10+
replacement:
11+
command: "sudo yum erase $(rpm -qa | grep mongodb-enterprise)"
12+
---
13+
stepnum: 3
14+
source:
15+
file: steps-uninstall-mongodb-on-linux.yaml
16+
ref: remove-db
17+
replacement:
18+
database_path: /var/lib/mongo
19+
...
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
stepnum: 1
2+
source:
3+
file: steps-uninstall-mongodb-on-linux.yaml
4+
ref: stop-mongodb
5+
---
6+
stepnum: 2
7+
source:
8+
file: steps-uninstall-mongodb-on-linux.yaml
9+
ref: remove-packages
10+
replacement:
11+
command: "sudo zypper remove $(rpm -qa | grep mongodb-enterprise)"
12+
---
13+
stepnum: 3
14+
source:
15+
file: steps-uninstall-mongodb-on-linux.yaml
16+
ref: remove-db
17+
replacement:
18+
database_path: /var/lib/mongo
19+
...
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
stepnum: 1
2+
source:
3+
file: steps-uninstall-mongodb-on-linux.yaml
4+
ref: stop-mongodb
5+
---
6+
stepnum: 2
7+
source:
8+
file: steps-uninstall-mongodb-on-linux.yaml
9+
ref: remove-packages
10+
replacement:
11+
command: "sudo apt-get purge mongodb-org*"
12+
---
13+
stepnum: 3
14+
source:
15+
file: steps-uninstall-mongodb-on-linux.yaml
16+
ref: remove-db
17+
...
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
title: Stop MongoDB.
2+
stepnum: 1
3+
ref: stop-mongodb
4+
action:
5+
pre: |
6+
Stop the :program:`mongod` process by issuing the following command:
7+
language: sh
8+
code: |
9+
{{stop_command}}
10+
replacement:
11+
stop_command: "sudo service mongod stop"
12+
---
13+
title: Remove Packages.
14+
stepnum: 2
15+
ref: remove-packages
16+
action:
17+
pre: |
18+
Remove any MongoDB packages that you had previously installed.
19+
language: sh
20+
code: |
21+
{{command}}
22+
---
23+
title: Remove Data Directories.
24+
stepnum: 3
25+
ref: remove-db
26+
action:
27+
pre: |
28+
Remove MongoDB databases and log files.
29+
language: sh
30+
code: |
31+
sudo rm -r {{log_path}}
32+
sudo rm -r {{database_path}}
33+
replacement:
34+
log_path: /var/log/mongodb
35+
database_path: /var/lib/mongodb
36+
...
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
stepnum: 1
2+
source:
3+
file: steps-uninstall-mongodb-on-linux.yaml
4+
ref: stop-mongodb
5+
---
6+
stepnum: 2
7+
source:
8+
file: steps-uninstall-mongodb-on-linux.yaml
9+
ref: remove-packages
10+
replacement:
11+
command: "sudo yum erase $(rpm -qa | grep mongodb-org)"
12+
---
13+
stepnum: 3
14+
source:
15+
file: steps-uninstall-mongodb-on-linux.yaml
16+
ref: remove-db
17+
replacement:
18+
database_path: /var/lib/mongo
19+
...
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
stepnum: 1
2+
source:
3+
file: steps-uninstall-mongodb-on-linux.yaml
4+
ref: stop-mongodb
5+
---
6+
stepnum: 2
7+
source:
8+
file: steps-uninstall-mongodb-on-linux.yaml
9+
ref: remove-packages
10+
replacement:
11+
command: "sudo zypper remove $(rpm -qa | grep mongodb-org)"
12+
---
13+
stepnum: 3
14+
source:
15+
file: steps-uninstall-mongodb-on-linux.yaml
16+
ref: remove-db
17+
replacement:
18+
database_path: /var/lib/mongo
19+
...

source/tutorial/install-mongodb-enterprise-on-amazon.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ Run MongoDB Enterprise
4646
----------------------
4747

4848
.. |mongod-user| replace:: ``mongod``
49-
.. |mongod-datadir| replace:: ``/var/lib/mongo``
49+
.. |mongod-datadir| replace:: ``/data/db``
5050

5151
.. include:: /includes/fact-installation-directories.rst
5252

source/tutorial/install-mongodb-enterprise-on-debian.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,10 @@ Run MongoDB Enterprise
3535
.. include:: /includes/fact-installation-directories.rst
3636

3737
.. include:: /includes/steps/run-mongodb-on-debian.rst
38+
39+
Uninstall MongoDB
40+
-----------------
41+
42+
.. include:: /includes/fact-uninstall.rst
43+
44+
.. include:: /includes/steps/uninstall-mongodb-enterprise-on-debian.rst

source/tutorial/install-mongodb-enterprise-on-red-hat.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,3 +46,10 @@ Run MongoDB Enterprise
4646
.. include:: /includes/fact-installation-directories.rst
4747

4848
.. include:: /includes/steps/run-mongodb-on-a-linux-distribution.rst
49+
50+
Uninstall MongoDB
51+
-----------------
52+
53+
.. include:: /includes/fact-uninstall.rst
54+
55+
.. include:: /includes/steps/uninstall-mongodb-enterprise-on-redhat.rst

source/tutorial/install-mongodb-enterprise-on-suse.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,10 @@ Run MongoDB Enterprise
3232
.. include:: /includes/fact-installation-directories.rst
3333

3434
.. include:: /includes/steps/run-mongodb-on-a-linux-distribution.rst
35+
36+
Uninstall MongoDB
37+
-----------------
38+
39+
.. include:: /includes/fact-uninstall.rst
40+
41+
.. include:: /includes/steps/uninstall-mongodb-enterprise-on-suse.rst

source/tutorial/install-mongodb-enterprise-on-ubuntu.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,10 @@ Run MongoDB Enterprise
3434
.. include:: /includes/fact-installation-directories.rst
3535

3636
.. include:: /includes/steps/run-mongodb-on-debian.rst
37+
38+
Uninstall MongoDB
39+
-----------------
40+
41+
.. include:: /includes/fact-uninstall.rst
42+
43+
.. include:: /includes/steps/uninstall-mongodb-enterprise-on-debian.rst

source/tutorial/install-mongodb-on-amazon.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,10 @@ Run MongoDB
4040
.. include:: /includes/fact-installation-directories.rst
4141

4242
.. include:: /includes/steps/run-mongodb-on-a-linux-distribution.rst
43+
44+
Uninstall MongoDB
45+
-----------------
46+
47+
.. include:: /includes/fact-uninstall.rst
48+
49+
.. include:: /includes/steps/uninstall-mongodb-on-redhat.rst

source/tutorial/install-mongodb-on-debian.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,3 +51,10 @@ Run MongoDB
5151
.. include:: /includes/fact-installation-directories.rst
5252

5353
.. include:: /includes/steps/run-mongodb-on-debian.rst
54+
55+
Uninstall MongoDB
56+
-----------------
57+
58+
.. include:: /includes/fact-uninstall.rst
59+
60+
.. include:: /includes/steps/uninstall-mongodb-on-debian.rst

source/tutorial/install-mongodb-on-red-hat.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,3 +46,10 @@ Run MongoDB
4646
.. include:: /includes/fact-installation-directories.rst
4747

4848
.. include:: /includes/steps/run-mongodb-on-a-linux-distribution.rst
49+
50+
Uninstall MongoDB
51+
-----------------
52+
53+
.. include:: /includes/fact-uninstall.rst
54+
55+
.. include:: /includes/steps/uninstall-mongodb-on-redhat.rst

source/tutorial/install-mongodb-on-suse.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,3 +44,10 @@ Run MongoDB
4444
.. include:: /includes/fact-installation-directories.rst
4545

4646
.. include:: /includes/steps/run-mongodb-on-a-linux-distribution.rst
47+
48+
Uninstall MongoDB
49+
-----------------
50+
51+
.. include:: /includes/fact-uninstall.rst
52+
53+
.. include:: /includes/steps/uninstall-mongodb-on-suse.rst

source/tutorial/install-mongodb-on-ubuntu.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,3 +48,10 @@ Run MongoDB
4848
.. include:: /includes/fact-installation-directories.rst
4949

5050
.. include:: /includes/steps/run-mongodb-on-debian.rst
51+
52+
Uninstall MongoDB
53+
-----------------
54+
55+
.. include:: /includes/fact-uninstall.rst
56+
57+
.. include:: /includes/steps/uninstall-mongodb-on-debian.rst

0 commit comments

Comments
 (0)