NetBackup™ for Cassandra Administrator's Guide

Last Published:
Product(s): NetBackup & Alta Data Protection (10.0)

Pre-requisites for Cassandra Restore

NetBackup supports recovery of Cassandra entire cluster, keyspace, or column family level. The backup images which are selected for recovery determine the point in time of recovery.

  • Backup host, data staging-server, Cassandra clusters must be on RHEL. For details of supported versions, refer to Software compatibility list.

  • Ensure to have enough free space on all the Data staging servers in the DSS cluster to run a restore operation. Free space must be two times greater than the largest object being recovered.

    Note:

    You can query the catalogs to find the object details before running a recovery. If enough space is not available on the DSS cluster, NetBackup fails the recovery job.

  • Make sure that Cassandra service is up and running on all the data staging servers.

  • Ensure to have enough free space on the target Cassandra cluster.

  • The target Cassandra cluster must be fully functional with access control to the appropriate users.

    Note:

    The Cassandra user account that is configured in NetBackup is used to restore the data. The recovered data is accessible to this account after the restore operation is complete.

  • For NetBackup 10.0, backup and restore are supported by CLI. Create policy, submit backup and job monitoring is supported by java GUI.

Recovery to original Cassandra cluster, keyspace, column family.

  • To recover Cassandra data back to the original location, ensure that the original Cassandra cluster is up and running and also, all the nodes are connected.

  • The images which need to be recovered must be identified.

  • Ensure that all the images of one backup operation are selected.

  • Ensure to run bpclimagelist command on the NetBackup primary server and get a list of images for a particular Cassandra cluster.

    bpclimagelist  - client Cassandra cluster name -ct 44  - K  - L

    The output shows a list of backup images for the given Cassandra cluster.

  • Whenever you upgrade cassendra or make any schema change, initiate a full backup before any incremental backup job.

  • Choose the images from the bpclimagelist command such that all the images of one full backup are selected. From the list of images for restore identify the lesser timestamp as the start time and the higher timestamp as end time.

  • To check the contents of the images you selected please run the following command on NetBackup primary server.

    bplist  - C Cassandra cluster name 
    -t 44 
     - R 
     - l 
     - s start time MM/DD/YYYY HH:MM 
    -e end time MM/DD/YYY HH:MM 
    /
    

    The output shows a list of backup up files in the backup images which are selected as per start and end time.

  • When you can see the key spaces and column families that you want to restore, then run the restore command on the NetBackup primary server.

  • You must specify a rename file to the bprestore command for Cassandra restores. Create a file with the following contents as the rename file and pass the path of this file to bprestore command.

    •	Rename file:
    {
    	"overwrite" : "true"
    }
    
    
  • You must also need to provide the restore selections in case you want to restore the entire cluster specify the restore selection as follows restore selection file.

    Restore selection file
    {
    	"restoreSelections" : { }
    }
    
    
  • To do the actual restore operation you need to run the following command on the NetBackup primary server Bprestore command.

    -S Primary_Server_Name
    -C  Cassandra cluster name  (Client_Name specified during Backup)
    -D  Restore host name
    -s mm/dd/yyyy hh:mm 
    -e mm/dd/yyyy hh:mm  (Date Time range)
    -t 44 (For Bigdata Policy Type -t 44)
    -f Restore selection file
    -R Rename file
    -application_type cassandra
    

    Note:

    -p option is not applicable for Cassandra.

  • Restore selections for a granular restore operation specifies the keyspace and column family.

    Restore selection
    {
    	"restoreSelections" : {
    		"keyspace name" : ["column family name"]
    		}
    }