Restoring from a backup

OpsCenter allows restoring data from a previously completed backup operation.

You can restore from any local or Amazon S3 backups that have been run by OpsCenter, but not from snapshots run from nodetool. You can pick any subset of tables that exist in the snapshot to restore.

Note: If the backup contains encrypted tables created prior to DataStax Enterprise 4.0.4 or 4.5.2, you will not be able to restore the snapshot. Due to a bug in Cassandra, backups containing encrypted table data from versions prior to 4.0.4 and 4.5.2 do not contain the necessary keys to restore the backup.
Note: Automatic schema recreation is not currently supported in Cassandra 2.1+ or DataStax Enterprise 4.7+ when using User Defined Types (UDTs). When restoring a table using UDTs, please ensure the table exists before starting the restore operation.

When restoring tables that are Solr cores, if the table does not already exist, it will be automatically re-created as a CQL table. If you require this to be a Thrift-based table, manually recreate the table prior to restoring.

Prerequisites

To restore an encrypted backup, the agent must be granted password-less sudo access on the DSE nodes. This has already been granted if you used OpsCenter to install the agents. If you are running the agent as a different user than DataStax Enterprise and need to restore encrypted tables, you must manually restore the system_key table.

Procedure

  1. Click the name of the cluster you want to manage from the left pane.
  2. Click Services.
  3. Click View Details for the Backup Service.
  4. Click Restore Backup.
  5. Find the backup you wish to restore in the list of backups and click Next.
    1. The Backups tab lists the available keyspace backups, including both scheduled and manual backups.
    2. If you have enabled commitlog backups, you can restore from a particular point-in-time by selecting the Point In Time tab. For more details, see Performing a point-in-time restore.
    3. If you are restoring from an S3 location that is not listed in the Backups tab, select Other Location.

      Selecting a backup from Other Location is most commonly used when cloning a cluster, but can be used when this OpsCenter instance is not aware of the backup location.

      Enter the name of the bucket under S3 Bucket, then the AWS key and secret.

  6. Select the tables included in the backup you want to restore. Click the keyspace name to include all the tables in the keyspace. Click All Keyspaces to restore all the keyspaces.

    To select only specific tables, expand the keyspace name and select the tables.

  7. Under Location, select the target cluster for the restored data.
    • The Location list is only available when both clusters are managed by the same instance of OpsCenter.
    • Restoring to a different cluster is only supported when the backup resides in S3; restoring from a local backup is not currently supported.
    • If you select a different cluster than the one that was backed up, the data will be cloned to the selected cluster.
    Note:

    Restoring encrypted tables to a different cluster will not work unless the encryption keys are identical, which is typically not the case.

  8. To remove the existing keyspace data before the data is restored, select Truncate/delete existing data before restore. This will completely remove any updated data in the cluster for the keyspaces you are restoring.
  9. To prevent overloading the network, set a maximum transfer rate for the restore. Select Throttle stream throughput at ____ MB and set the maximum MB per second.


  10. Click Restore Backup.
  11. Click Start Restore.

Results

After the restore starts, a dialog displays detailed information about the status of the restore. This dialog can be closed at any time without affecting the restore process, and can be reopened by clicking on the In Progress restore in the Activity section in the OpsCenter UI.
Note: If you are restoring (essentially cloning) from an S3 backup, and you close the Restore Report dialog, you must reopen the status report from the destination cluster.