Skip to content

Back up and restore NebulaGraph data

To prevent data loss due to operational errors or system failures, NebulaGraph offers the Backup & Restore (BR) tool to help users back up and restore graph data. Dashboard Enterprise Edition integrates BR capabilities and offers simple UIs that allow users to perform data backup and restore operations in just a few steps. This document describes how to use Dashboard Enterprise Edition to backup and restore NebulaGraph data.

Limits

  • Currently, Dashboard only supports backup data to cloud storage services compatible with the S3 protocol (e.g. OSS, MinIO, Ceph RGW, etc.) and does not support local backups.

    Note

    To back up data to a local device, see What is Backup & Restore.

  • Currently, only full backup and full restore of data are supported, and incremental backup and incremental restore are not supported.
  • Backup and restoration of space-level data are not supported.
  • Backup data can only be restored to the original cluster, and cannot be restored across clusters.
  • Breakpoint moving of backup and restore data is not supported.
  • Currently, only the logs generated by backup and restore operations are supported.

Prerequisites

  • A cluster is created with Dashboard.
  • A cloud storage service that is compatible with the S3 protocol is activated and a storage bucket is created. For details, see the documentation for the corresponding cloud storage service.

Steps

Entry

  1. In the top navigation bar, click Cluster Management.
  2. On the right side of the target cluster, click Detail.
  3. In the left navigation bar, click Operation->Backup&Restore.

Back up data

Data is backed up to the cloud storage service by creating a backup file as follows.

  1. On the Backup&Restore page, click the Backup List tab.
  2. In the upper right corner of the page, click S3 Service Settings.
  3. Fill in the configuration information for the corresponding cloud storage service and click Submit.

    Parameter Description
    s3.access_key The Access Key ID that is used to identify a user. For example, AKIAI44QH8DHBxxxx.
    s3.endpoint The domain URL of the entry point for the cloud storage service. For example, https://s3.us-east-2.amazonaws.com. The URL containing bucket_name is not supported, such as https://{bucket_name}.s3.us-west-2.amazonaws.com.
    s3.region The physical location of a data center. For example, us-east-1.
    s3.secret_key The Access Key Secret that is used to verify the identity of the user. For example, je7MtGbClwBF/2Zp9Utk/h3yCoxxxx.
    storage path The data storage path which must start with s3. For example, s3://br-test/backup/.

    The following configurations are examples for Alibaba Cloud Object Storage Service and Amazon S3:

    • For Amazon S3:

      amazon_s3

    • For Alibaba Cloud Object Storage Service:

      aliyun_oss

    Caution

    To back up data to OSS, you need to replace oss with s3 for the OSS storage path. For example, change the original OSS path oss://nebula-br-test/ to s3://nebula-br-test/.

  4. In the upper right corner of the page, click Create New Backup.

  5. On the Create New Backup page, click Environment check to check whether the relevant configurations are working properly, and then click Submit.

    Environment check includes:

    • Your NebulaGraph cluster is running.
    • The access key to log onto the storage service has not expired.
    • The status of business traffic. It only checks if the QPS of your business is 0. When QPS is not 0, you are prompted to back up data during off-peak hours.

    Note

    You are unable to submit the backup when your cluster works abnormally or the access key to the storage service has expired.

  6. View the created backup file in the backup list.

    br_list

    • The backup list shows backups created within 30 days by default, showing backup name, time, status, backup spaces, backup type, storage path, and related operations.
      • The backup status includes running, success, and failed.
      • Related operations include restoring the backup, viewing restoration records, viewing logs generated by the backup operation, and deleting the backup.
    • You can filter created backups by creation time and status) or search backup file names for backups.

    Note

    You are unable to perform a new backup until the previous backup is completed.

  7. Check if the created backup file exists in the storage service. Successfully created backup files are stored to the storage path set above, like s3://nebula-br-test.

    • Amazon S3: br_s3_path
    • Alibaba Cloud Object Storage Service: aliyun_oss_backup_cn

    Danger

    Do not modify the file name and storage path of backup files, otherwise, the backup data cannot be restored to the cluster.

Restore data

You can restore the backed-up data stored in the cloud storage service to the original cluster.

Caution

  • Before restoring the data, please make sure that the name and storage path of the backup file stored in the cloud storage service are not changed, otherwise, the data restoration will fail.
  • During the data restoration process, all data in the cluster is removed and replaced with the data in the backup file.
  • The restoration process is executed offline, and you cannot perform other operations during the data restoration process.

Follow the steps below to restore data.

  1. On the Backup&Restore page, click the Backup list tab.
  2. To the right of the target backup file, click Restore.
  3. Click Environment check, and when the environment check is passed, click Submit.

    Environment check includes:

    • Your NebulaGraph cluster is running.
    • The access key to log onto the storage service has not expired.
    • No business website traffic.
  4. On the Restore record list page, view restoration records. restore_list

    • Restoration records cannot be deleted.
    • The list page displays restoration records created within 30 days.
    • The list page displays the restoration ID, backup file name, status, time, graph space, storage path, operator, and the log generated by the restoration operation.
    • The restoration status includes running, success, and failed.

      Note

      You're unable to restore the backup data until the previous restoration is complete.

    • You can filter restoration records by creation time and status, or search backup file names for restoration records.

Last update: February 19, 2024