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 or later 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.

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

For example, if a DSE Graph 5.1 backup was taken in OpsCenter 6.5, the DSE Graph 5.1 graph can be restored in DSE 6.0.

Fewer steps are required for restoring backups with OpsCenter 6.5 or later.

Procedure

  1. If you are restoring a manually dropped graph to the same cluster, create thegraph_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.
  2. If you are backing up and restore a graph to a different cluster (clone), create the three 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.

  3. In OpsCenter, 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 OpsCenter 6.1 or earlier for DSE 5.1 or earlier, 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, upgrade to OpsCenter 6.5 or later and create a backup for the DSE 5.1 graph in OpsCenter 6.5.
  4. Restore the backup to the same cluster or a different (clone) cluster as appropriate. See Restoring a cluster and Cloning cluster data.
  5. If you are restoring a manually dropped graph to the same cluster or if you are cloning the cluster, 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 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. For cloned clusters, ensure the topology of the target cluster keyspaces is the same as the topology of source cluster keyspaces.
    Note: Ensure the source and target datacenter names and topology are identical. See Cluster topology overview and Cloning cluster data.