Skip to content

Upgrade NebulaGraph Enterprise Edition from version 3.x to 3.5.0

This topic takes the enterprise edition of NebulaGraph v3.1.0 as an example and describes how to upgrade to v3.5.0.

Notes

  • This upgrade is only applicable for upgrading the enterprise edition of NebulaGraph v3.x (x < 4) to v3.5.0. For upgrading from version 3.4.0 and above to 3.5.0, you can directly replace the binary files for an upgrade. For more information, see Upgrade NebulaGraph to 3.5.0.

    Note

    If your version is below 3.0.0, please upgrade to enterprise edition 3.1.0 before upgrading to v3.5.0. For details, see Upgrade NebulaGraph Enterprise Edition 2.x to 3.1.0.

  • The IP address of the machine performing the upgrade operation must be the same as the original machine.
  • The remaining disk space on the machine must be at least 1.5 times the size of the original data directory.
  • Before upgrading a NebulaGraph cluster with full-text indexes deployed, you must manually delete the full-text indexes in Elasticsearch, and then run the SIGN IN command to log into ES and recreate the indexes after the upgrade is complete.

    Note

    To manually delete the full-text indexes in Elasticsearch, you can use the curl command curl -XDELETE -u <es_username>:<es_password> '<es_access_ip>:<port>/<fullindex_name>', for example, curl -XDELETE -u elastic:elastic 'http://192.168.8.223:9200/nebula_index_2534'. If no username and password are set for Elasticsearch, you can omit the -u <es_username>:<es_password> part.

Steps

  1. Contact us to obtain the installation package of the enterprise edition of NebulaGraph v3.5.0 and install it.

    Note

    The upgrade steps are the same for different installation packages. This article uses the RPM package and the installation directory /usr/local/nebulagraph-ent-3.5.0 as an example. See Install with RPM packages for specific operations.

    Caution

    Please ensure that the number of storage paths set for the --data_path parameter in the Meta and Storage service configuration files of the 3.5.0 cluster is the same as that for the --data_path parameter in the configuration files of the 3.x cluster. Otherwise, the upgraded cluster will not start.

  2. Stop the enterprise edition of v3.x services. For details see Manage NebulaGraph services.

    Run the nebula.service status all command to confirm that all services have been stopped after running the command.

  3. In the installation directory of the Enterprise Edition NebulaGraph v3.5.0, run the following commands to upgrade the Storage and Meta services.

    • Upgrade the Storage service:

      Syntax:

      sudo ./bin/db_upgrader  --max_concurrent_parts=<num> --src_db_path=<source_storage_data_path> --dst_db_path=<destination_storage_data_path>
      
      Parameter Description
      --max_concurrent_parts Specify the number of partitions to upgrade simultaneously, with the default value being 1.
      It is recommended to increase the value appropriately based on disk performance.
      --src_db_path Specify the absolute path to the source data directory. The following takes the source data directory /usr/local/nebula-ent-3.1.0/data/storage as an example.
      --dst_db_path Specify the absolute path to the target data directory. The example target data directory is /usr/local/nebula-ent-3.5.0/data/storage.

      Example:

      sudo ./bin/db_upgrader --max_concurrent_parts=20 --src_db_path=/usr/local/nebula-ent-3.1.0/data/storage --dst_db_path=/usr/local/nebula-ent-3.5.0/data/storage
      

      If there are multiple source data directories, specify each source data directory and target data directory and run the corresponding command. For example, there are two source data directories /usr/local/nebula-ent-3.1.0/data/storage and /usr/local/nebula-ent-3.1.0/data2/storage, run the following commands:

      sudo ./bin/db_upgrader --src_db_path=/usr/local/nebula-ent-3.1.0/data/storage --dst_db_path=/usr/local/nebula-ent-3.5.0/data/storage
      
      sudo ./bin/db_upgrader --src_db_path=/usr/local/nebula-ent-3.1.0/data2/storage --dst_db_path=/usr/local/nebula-ent-3.5.0/data2/storage
      
    • Upgrade the Meta service:

      Syntax:

      sudo ./bin/meta_upgrader --src_meta_path=<source_meta_data_path> --dst_meta_path=<destination_meta_data_path>
      
      Parameter Description
      --src_meta_path Specify the absolute path to the source meta data directory. The following takes the source data directory /usr/local/nebula-ent-3.1.0/data/meta as an example.
      --dst_meta_path Specify the absolute path to the target meta data directory. The example target data directory is /usr/local/nebula-ent-3.5.0/data/meta.

      Example:

      sudo ./bin/meta_upgrader --src_meta_path=/usr/local/nebula-ent-3.1.0/data/meta --dst_meta_path=/usr/local/nebula-ent-3.5.0/data/meta
      

      If there are multiple source meta data directories, specify each source meta data directory and target meta data directory and run the corresponding command.

    After the upgrade, a data directory will be generated in the v3.5.0 installation directory, containing the upgraded data files.

  4. Start and connect to the NebulaGraph v3.5.0 enterprise edition service and verify that the data is correct. The following commands can be used as reference:

    nebula> SHOW HOSTS;
    nebula> SHOW HOSTS storage;
    nebula> SHOW SPACES;
    nebula> USE <space_name>
    nebula> SHOW PARTS;
    nebula> SUBMIT JOB STATS;
    nebula> SHOW STATS;
    nebula> MATCH (v) RETURN v LIMIT 5;
    

Docker Compose Deployment

Caution

For NebulaGraph deployed using Docker Compose, it is recommended to redeploy the new version and import data.


Last update: August 17, 2023