Upgrade NebulaGraph Enterprise Edition from version 3.x to 3.4.1¶
This topic takes the enterprise edition of NebulaGraph v3.1.0 as an example and describes how to upgrade to v3.4.1.
- This upgrade is only applicable for upgrading the enterprise edition of NebulaGraph v3.x (x < 4) to v3.4.1. For upgrading from version 3.4.0 and above to 3.4.1, you can directly replace the binary files for upgrade. For more information, see Upgrade NebulaGraph to 3.4.1 .
If your version is below 3.0.0, please upgrade to enterprise edition 3.1.0 before upgrading to v3.4.1. For details, see [Upgrade NebulaGraph Enterprise Edition 2.x to 3.1.0](https://docs.nebula-graph.io/3.1.0/4.deployment-and-installation/3.upgrade-nebula-graph/upgrade-nebula-graph-to-latest/).
- 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 INcommand to log into ES and recreate the indexes after the upgrade is complete.
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
Contact us to obtain the installation package of the enterprise edition of NebulaGraph v3.4.1 and install it.
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.4as an example. See Install with RPM packages for specific operations.
Please ensure that the number of storage paths set for the
--data_pathparameter in the Meta and Storage service configuration files of the 3.4.1 cluster is the same as that for the
--data_pathparameter in the configuration files of the 3.x cluster. Otherwise, the upgraded cluster will not start.
Stop the enterprise edition of v3.x services. For details see Manage NebulaGraph services.
nebula.service status allcommand to confirm that all services have been stopped after running the command.
In the installation directory of the Enterprise Edition NebulaGraph v3.4.1, run the following commands to upgrade the Storage and Meta services.
Upgrade the Storage service:
sudo ./bin/db_upgrader --max_concurrent_parts=<num> --src_db_path=<source_storage_data_path> --dst_db_path=<destination_storage_data_path>
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.
Specify the absolute path to the source data directory. The following takes the source data directory
/usr/local/nebula-ent-3.1.0/data/storageas an example.
Specify the absolute path to the target data directory. The example target data directory is
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.4/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/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.4/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.4/data2/storage
Upgrade the Meta service:
sudo ./bin/meta_upgrader --src_meta_path=<source_meta_data_path> --dst_meta_path=<destination_meta_data_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/metaas an example.
Specify the absolute path to the target meta data directory. The example target data directory is
sudo ./bin/meta_upgrader --src_meta_path=/usr/local/nebula-ent-3.1.0/data/meta --dst_meta_path=/usr/local/nebula-ent-3.4/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
datadirectory will be generated in the v3.4.1 installation directory, containing the upgraded data files.
Upload the license file to the
share/resourcesdirectory under the v3.4.1 installation directory.
Start and connect to the NebulaGraph v3.4.1 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¶
For NebulaGraph deployed using Docker Compose, it is recommended to redeploy the new version and import data.