HW-2.5, -delete old DB files-

In HW-2.5, one can read for the 2nd step of the procedure:

Safely shutdown a secondary of the replica set and delete the old database files.

Once the server is shutdown, I have some doubts about the proper way to delete the old database files.

The first solution coming up to my mind is running this command in the VM terminal:
(supposing the last -31252- is the one shutdown)

vagrant@database:~$ rm -r M310-HW-2.5/r2/*

But it may be somewhat too abrupt, and not the right way.

Any comment would be helpful.

… I just did that, to start with … and it just worked.

I was lucky.

No need to be delicate with mongod … at least in this case.

1 Like