Backing up and restoring DSE Graphs in OpsCenter

Guidelines for backing up and restoring DSE Graphs using the OpsCenter Backup Service. DataStax recommends upgrading to OpsCenter 6.5 to take advantage of simplified backups and restores for DSE Graphs.

Follow these instructions to backup and restore DSE Graphs using the OpsCenter Backup Service. The steps you need to follow depend on:
  • the versions of DSE and OpsCenter.
  • the type of restore operation (to the same cluster or cloned data to a different cluster).
  • whether or not a graph was dropped.
The order in which the steps are performed are outlined in the DSE Graph guidelines table.

DataStax highly recommends upgrading to OpsCenter 6.5 to take advantage of improved and simplified backups and restores for DSE Graphs. For instance, a DSE Graph version 5.x can be restored in DSE 6.x if the 5.x backup was taken in OpsCenter version 6.5.x. The graph_name_pvt table has been removed for DSE versions 6.0 and later. When restoring a DSE 5.0.x or DSE 5.1.x graph, the _pvt table is removed during the restore process by OpsCenter 6.5 and later. To restore a graph backup from DSE 5.0.x or 5.1.x to DSE 6.0, the backup must be taken in OpsCenter 6.5.

Fewer steps are required for restoring backups when using the latest version of OpsCenter (6.5 or later), as is evident from the guidelines below.

Table 1. DSE Graph backup and restore guidelines
OpsCenter versions DSE versions Operations Steps Sequence
6.5.x 5.0.x, 5.1.x, 6.0.x Backup and restore to same cluster 1, 2
6.5.x 5.0.x, 5.1.x, 6.0.x Backup and restore to different cluster (clone) 1, 2, 7
6.1.x 5.0.x, 5.1.x Same cluster, does not involve a manually dropped graph 1, 2, 6
6.1.x 5.0.x, 5.1.x Same cluster, manually dropped graph (graph is recreated) 3, 1, 2, 5, 6
6.1.x 5.0.x, 5.1.x Backup and restore to different cluster (clone) 4, 1, 2, 5 ,6, 7

Procedure

  1. In OpsCenter (version 6.5 highly recommended), create a backup of the DSE Graph: Run an ad hoc backup, create a one-off scheduled backup, or set up a recurring scheduled backup.
    Note: If a DSE Graph backup was created in an OpsCenter version prior to 6.5 (6.0.x or 6.1.x) for a DSE version earlier than 6.0 (5.0.x or 5.1.x), OpsCenter cannot restore that legacy backup into DSE 6.0 because the data needed is not present in the older backup schemas. In this case, simply upgrade to OpsCenter 6.5 and create a backup for the DSE 5.x graph in OpsCenter 6.5.
  2. Restore the backup to the same cluster or a different (clone) cluster as appropriate. See Restoring a cluster and Cloning cluster data.
  3. (If applicable step, see table guidelines OpsCenter 6.1.x and 6.0.x only) Manually create the graph_name_pvt keyspace using DataStax Studio:
    CREATE KEYSPACE "<graph_name_pvt>" WITH replication = {'class': 'NetworkTopologyStrategy', ‘originalcluster’: '1'}  AND durable_writes = true;
    Replace originalcluster with the original datacenter name.
    Note: The graph_name and graph_name_system keyspaces already exist; only the graph_name_pvt keyspace needs to be created.
  4. (If applicable step, see table guidelines OpsCenter 6.1.x and 6.0.x clone restores only) Create the 3 graph keyspaces using DataStax Studio:
    CREATE KEYSPACE "<graph_name>" WITH replication = {'class': 'NetworkTopologyStrategy', 'restorecluster': '1'}  AND durable_writes = true;
    CREATE KEYSPACE "<graph_name_system>” WITH replication = {'class': 'NetworkTopologyStrategy', 'restorecluster': '1'}  AND durable_writes = true;
    CREATE KEYSPACE "<graph_name_pvt>" WITH replication = {'class': 'NetworkTopologyStrategy', 'restorecluster': '1'}  AND durable_writes = true;

    Replace <graph_name> with the graph’s name and restorecluster with the new datacenter name. When cloning to a different cluster, the keyspaces must be manually created, because otherwise OpsCenter Restore Backup creates these keyspaces with the source cluster’s datacenter designations and the graph data will not be copied.

  5. (If applicable step, see table guidelines OpsCenter 6.1.x and 6.0.x only) Insert a dse_system.shared_data record using DataStax Studio:
    INSERT INTO dse_system.shared_data (
    dataspace, 
    valid_until, 
    namespace, 
    Name,
     last_updated, 
    Json,
     type, 
    written_on) 
    VALUES
     ('Cluster',
    13814000-1dd2-11b2-0000-000000000000, 
    'system', 
    'DSE_GRAPH_QUICKSTART', now(),
    0x1f8b0800000000000000abe65250504a2e4a4d2c494d5152b0523034b1b0b0343036b030d13335353600031d909ae292c492d2629012259fccb25425ae5a00e2fb48b33b000000,
     'json', 
    now()) ;

    Insert a new record in the dse_system.shared_data table of the destination cluster with values obtained from the source cluster: select * from dse_system.shared_data from the original source DSE cluster. Get the values for dataspace, valid_until, namespace, and Name fields from the source DSE Graph cluster, and replace the values into the corresponding statement values above for the destination cluster.

  6. (If applicable step, see table guidelines OpsCenter 6.1.x and 6.0.x only) If a graph has multiple search indexes against a single vertex label, or a search index and materialized views against a vertex label, you must manually recreate the graph indexes and materialized views. Manually recreate the indexes (search, materialized views) in the original source cluster using DataStax Studio. See Adding index schema.
  7. (If applicable step, see table guidelines for cloned clusters) Ensure that the topology of the destination (target) cluster keyspaces is the same as the topology of source cluster keyspaces.