Copy cluster data from one cluster to another using the Restore Backup feature in
OpsCenter.
Cloning a cluster using the Backup Service is a simple way to copy the data from one
cluster to another cluster while keeping the clusters separate. Unlike adding
another data center to the cluster, where updates to the data propagate across the
data centers, a cloned cluster is a completely different cluster that is isolated
from the original cluster. Cloning a cluster is useful for development, where you
need to update applications using real data but do not want to touch the production
cluster. You can also use cloning for testing or performance tuning.
Prerequisites
To clone the data, you must have backed up your cluster to an Amazon S3
location.
Procedure
-
Click .
-
Click the Configure link for the Backup Service.
-
In the Activity tab, click Restore Backup.
The Restore from Backup dialog appears.
-
In the Backups tab, select the backup that contains the data you want to clone
and click Next.
If the OpsCenter instance does not currently manage the cluster you want to
clone, you can still clone it if the cluster data was backed up to an S3
location from another OpsCenter instance. Select the Other
Location tab in Restore from Backup and
enter the S3 information to retrieve the data backed up from the other
OpsCenter instance.
-
Click Other Location.
-
Enter the S3 bucket name under S3 Bucket.
-
Enter your AWS credentials under AWS Key and
AWS Secret.
-
Click Next.
-
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.
Note: Restoring a snapshot that contains only the system keyspace is not allowed. There must be both system and non-system keyspaces,
or only non-system keyspaces in the snapshot you want to restore.
-
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.
-
To remove the existing keyspace data before the data is restored, select
Truncate/delete existing data before restore. This
completely removes any updated data in the cluster for the keyspaces you are
restoring.
-
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.
-
Change the staging directory if necessary by
setting the
backup_staging_directory
configuration
option in address.yaml.
-
Click Restore Backup.
-
Click Start Restore to confirm when prompted.
If the pre-restore checks detected schema differences that could not
automatically be validated, the Restore Schema Validation dialog appears.
Possible issues are listed and a comparison of the backup and current schema are
presented side-by-side.
Results
The details and progress of the restore operation are displayed in a progress dialog,
and also appear in the Backup Activity of the target cluster.
If you close the progress dialog, track the progress and status of the restore in
the destination cluster's Backup Activity section.