Skip to main content
Version: 10.2.8

Migrate Elasticsearch data directory

The page guides you on migrating the Elasticsearch data directory to a dedicated storage for the existing Work.AI clusters. Having a dedicated disk device significantly impacts the throughput and stable latencies under high disk load and improves the product's overall stability.

The recommended storage device is an SSD disk with at least 100 GB of free space.

By default, INSTALL_DIR is set to /opt/workfusion/ on the Master server. Note that you have to execute the following commands on the same server as well.

To migrate the Elasticsearch's data directory, follow the steps below:

  1. Connect an SSD disk to the Master server.

  2. Stop all services:

    ./install.sh stop_services full
  3. Back up the content of the data directory:

    mkdir -p /INSTALL_DIR/elasticsearch/databackup
    cp -a /INSTALL_DIR/elasticsearch/data/. /INSTALL_DIR/elasticsearch/databackup/
  4. Clear the data directory:

    rm -r /INSTALL_DIR/elasticsearch/data/*
  5. Mount the new partition to the data directory. See the instruction for more information.

  6. Set the application user as an owner of the data directory.

    chown -R WFUSER:WFUSER /INSTALL_DIR/elasticsearch/data
  7. Copy the backup files back to the datalog directory:

    cp -a /INSTALL_DIR/elasticsearch/databackup/. /INSTALL_DIR/elasticsearch/data/
  8. Start the services:

    ./install.sh start_services full