Search

Database Server

Articles

Perform the following steps to stop and start the Database Server whenever there is maintenance activity or application upgrades.

Checking Database Server Status

Execute the mentioned commands to check Database services status:

Postgres Status

systemctl status postgresql-12

Image description

Mongo Status

ps -ef | grep mongo

Image description

Stop Database Server

Execute the mentioned commands to stop the Database services:

  1. Stop the Postgres Service.
    • systemctl stop postgresql-12
    • systemctl status postgresql-12

    Image description
  2. Stop the Mongo Service.
    • ps -ef | grep mongo | grep -v "grep mongo"| awk '{ print $2 }'| xargs kill -9
    • ps -ef | grep mongo

    Image description

Start Database Server

Execute the mentioned commands to start the Database services:

  1. Start the Postgres Service.
    • systemctl start postgresql-12
    • systemctl status postgresql-12

    Image description
  2. Start the Mongo Service.
  3. mongod -f $MOUNTPOINT/mongo/conf/mongo.conf

    Image description
Did you find what you were looking for?