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.
- 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
-
If you are restoring a manually dropped graph to the same cluster, create
the
graph_name_pvt
keyspace using DataStax Studio:CREATE KEYSPACE "<graph_name_pvt>" WITH replication = {'class': 'NetworkTopologyStrategy', ‘originalcluster’: '1'} AND durable_writes = true;
Replaceoriginalcluster
with the original datacenter name.Note: Thegraph_name
andgraph_name_system
keyspaces already exist; only thegraph_name_pvt
keyspace needs to be created. -
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.
-
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.
- Restore the backup to the same cluster or a different (clone) cluster as appropriate. See Restoring a cluster and Cloning cluster data.
- 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.
-
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.