You can perform a restore operation of the Cassandra keyspace or column family to a new Cassandra cluster.
The destination instance can have any of the following configurations:
-
The same number of nodes as the source
-
Fewer number of nodes than the source
-
A larger number of nodes than the source
If the number of nodes on the source and destination do not match, then you can set the same target node to multiple source nodes.
If you restore commit logs across clusters or instances, then they must all run the same Cassandra version.
When you select the option to use the bulk load, you must provide a path that has enough free space to hold the keyspaces. The software automatically creates the path when it performs the restore.
If you enabled incremental backups on the Cassandra cluster, then after the restore or dead node replacement, Cassandra might create several files under the directory named "backups" as part of the compaction process. If you disable incremental backups on the destination cluster before the restore, then you can reduce the following:
-
The space used for the files that are created under the "backups" directory
-
The application size of the next incremental backup
Best Practice: If you have multiple data paths, then use the sstableloader option (Restore Options dialog box, General tab, Use SSTableLoader Tool check box). This option ensures that the software distributes the data across directories.
Before You Begin
-
To disable incremental backups, on the command line, type the following command:
nodetool disablebackup -
You can optionally configure the software to:
-
Use a specified replication factor and strategy. For more information, see Overwriting the Cassandra Restore Replication Factor.
-
Set a specified OS user and group for the restored data. For more information, see Using a Different OS User Name on the Cassandra Destination Node and Setting the OS User Group for Cassandra Restored Files.
-
-
If you want to restore column families that use user defined TYPES and during the restore if those TYPES do not exist in the keyspace, then you can have the software restore the TYPES and then the column families. Make sure the keyspace does not exist before you start the restore.
Procedure
-
From the CommCell Browser, expand Client Computers > client > Big Data Apps > instance.
-
Right-click the default_subclient, and then click Browse and Restore.
-
On the Browse and Restore Options dialog box, select the restore options.
-
To restore the latest backup, select Latest Backup.
-
To restore to a point-in-time, select Time Range, and then type the date and time in the Start and End boxes.
-
-
Click View Content.
-
On the Browse page, determine what data to restore.
The Browse page displays all the cluster nodes in the left pane.
-
Expand the nodes to view the keyspaces, and the ColumFamily entities that keyspace contains.
-
To include data from all the nodes in the restore, perform the following operations:
-
For a keyspace, right-click the keyspace, and then click Select Keyspace from all nodes.
-
For a ColumnFamily, right-click the ColumnFamily, and then click Select ColumnFamily from all nodes.
-
-
Click Recover All Selected.
The Restore Options dialog box appears.
-
-
On the General tab, select the restore options:
-
Select the Out of place restore check box.
-
From the Destination Instance list, select the new Cassandra instance.
-
Set the target for the source nodes.
The software restores the data from one or more source nodes to the target node.
You must set the target for every node.
Option
Steps
Set a source node to a unique target
In the row for the source, from the Target list, select the node.
Set multiple source nodes to the same target
-
In the Source column, select the nodes to set to the same target, and then click Set Target.
The Select Target dialog box appears.
-
From the Select Target list, select the node, and then click OK.
-
-
Select the Use SSTableLoader Tool check box.
When you select this option, you must provide a path in the Staging Location box.
-
Optional: To recover the database without using staging location (stage-free recovery), select the Run Stage Free Recover check box.
A stage-free recovery process creates a 3DFS share on the MediaAgent and mounts the share on the client computers. The sstableloader is then run on the mounted directory. You do not require to select the Use SSTableLoader Tool or Staging Location options.
Do not use the same MediaAgent for both 3DFS configuration and other configurations like IP library, because both of them use port 2049 by default.
If there is a firewall between the Cassandra client nodes and the MediaAgent, see Configuring Access to the MediaAgent for Cassandra Restores.
-
To truncate tables before you perform restore, select the Truncate Tables Before Restore check box.
Note
: If you select the Truncate Tables Before Restore check box, the Commvault software truncates only user-defined keyspaces, leaving system keyspaces as it is. If a user-defined keyspace name starts with system or dse, before you perform restore, you must manually truncate all the associated tables.
-
To restore the commit log, select the Restore Commit Log check box.
Note
If you have a high number of commit logs to be replayed, you can set the nCassandraStartWaitTime additional setting to wait for the number of seconds before verifying if the Cassandra service has come back up. For instructions about adding an additional setting from the CommCell Console, see Adding or Modifying Additional Settings from the CommCell Console.
-
Select the database recover option.
-
To have the software recover the database, select Recover.
-
To have the Commvault software restore the database files for the selected keyspaces/ColumnFamily to the staging path, and to prevent the software from recovering the database after the restore, select Do Not Recover.
-
-
In the Staging Location box, type the full path to the staging location.
The Cassandra user must have access to this staging location.
-
In the Number of Streams box, type the number of streams the software uses for the restore operation.
-
-
Click OK.
Result
The software restores the data. If you chose Do Not Recover, you must manually run the sstableloader after the restore completes, to recover the database.
What to Do Next
If you disabled incremental backups, use the following command to enable them:
nodetool enablebackup