Skip to main content

ServiceOps Application and Database Backup Procedure

Overview

Effective Application and Database Backup ensures business continuity, data integrity, and security in IT environments. Motadata ServiceOps provides a robust backup management solution that helps organizations safeguard critical applications and databases against data loss, corruption, and cyber threats. With automated backup scheduling, secure storage, and quick recovery options, businesses can minimize downtime and maintain operational efficiency.

Application Backup

To take the backup of the ServiceOps application, follow the below steps:

  1. Login to the terminal server.

  2. Navigate to the home directory using the below command:

    cd /home/motadata

  3. Create a backup folder with the current date:

    Syntax: mkdir backupApp_DD-MM-YYYY

    Example: mkdir backupApp_12-03-2025

  4. Move into the above directory using the below command:

    Syntax: cd backupApp_DD-MM-YYYY/

    Example: cd backupApp_12-03-2025

  5. Create sub-directories under the “backupApp_12-03-2025” directory for the different servers and components as shown below:

    mkdir main-server
    mkdir analytics-server
    mkdir fileserver
    mkdir chat_server
    mkdir plugin-server
    mkdir discovery-service
    mkdir otherfiles

Main Server Backup

  1. Navigate to the main server directory using the below command:

    cd main-server

  2. Copy the necessary files:

    cp -pr /opt/flotomate/main-server/lib . 
    cp -pr /opt/flotomate/main-server/dbs .
    cp -pr /opt/flotomate/main-server/config .
    cp -pr /opt/flotomate/main-server/filedb .
    cp -pr /opt/flotomate/main-server/elastic .

Analytics Server Backup

  1. Navigate to the analytics-server directory using the below command:

    cd ../analytics-server

  2. Copy the necessary files:

     cp -pr /opt/flotomate/cm-analytics/lib .
    cp -pr /opt/flotomate/cm-analytics/config .
    cp -pr /opt/flotomate/cm-analytics/filedb .

File Server Backup

  1. Navigate to the fileserver directory using the below command:

    cd ../fileserver

  2. Copy the necessary files:

    cp -pr /opt/flotomate/fileserver/lib .
    cp -pr /opt/flotomate/fileserver/config .

Chat Server Backup

  1. Navigate to the chat_server directory uisng the below command:

    cd ../chat_server

  2. Copy the necessary files:

    cp -pr /opt/flotomate/chat_server/*.* .

Plugin Server Backup

  1. Navigate to the plugin-server directory uisng the below command:

    cd ../plugin-server

  2. Copy the necessary files:

    cp -pr /opt/flotomate/plugin-server/ .

Discovery Service Backup

  1. Navigate to the discovery-service directory using the below command:

    cd ../discovery-service

  2. Copy the necessary files:

    cp -pr /opt/flotomate/discovery-service/lib .
    cp -pr /opt/flotomate/discovery-service/config .
    cp -pr /opt/flotomate/discovery-service/filedb .

Backup Other Files

  1. Navigate to the otherfiles directory using the below command:

    cd ../otherfiles

  2. Copy the necessary files from the required folders:

Frontend Application

cp -pr /opt/flotomate/frontend .

Nginx

cp -pr /etc/nginx .

Security certificate and keys:

cp -pr /etc/ssl .

Configuration files of PostgreSQL database:

cp -pr /etc/postgresql .

Data files of PostgreSQL database:

cp -pr /var/lib/postgresql/16/main .

Database Backup

  1. Navigate to the home directory:

    cd /home/motadata

  2. Create a backup folder with the current date:

    Syntax: mkdir backupDB_DD-MM-YYYY

    Example: mkdir backupDB_12-03-2025

  3. Navigate to the utility folder:

    cd /tmp

  4. Run the database dump command:

    sudo -u postgres pg_dump -U postgres -d flotoitsmdb -F c -b -v -f /tmp/flotoitsmdb_dump -d flotoitsmdb

  5. Copy the database dump to the backup folder:

    cp flotoitsmdb_dump /home/motadata/backupDB_DD-MM-YYYY

  6. Copy the main server folder backup (Optional) (if main folder size is not much) For Ubuntu OS

    cd /var/lib/postgresql/16
    cp –r main /home/motadata/backupDB_DD-MM-YYYY

For Redhat OS

cd /var/lib/pgsql/16
cp –r data /home/motadata/backupDB_DD-MM-YYYY