• Glossary
  • Support
  • Downloads
  • DataStax Home
Get Live Help
Expand All
Collapse All

DataStax Enterprise OpsCenter 6.8

    • About OpsCenter
      • New features
      • Key features
      • Labs features
        • Exporting and importing dashboard presets
        • Adding a Swift CLI backup location
        • Configuring named route linking
        • Viewing logs from node details
      • Architecture overview
      • OpsCenter policy for DDAC and OSS
      • Feedback about OpsCenter
    • Release notes
    • Installing OpsCenter
    • Upgrading OpsCenter
    • OpsCenter recommended settings
      • OpsCenter basic configurations
      • Cluster synchronization settings
      • Backup Service settings
      • Knowledge Base articles
    • Configuring OpsCenter
      • OpsCenter Security
        • OpsCenter SSL overview
          • Enabling/Disabling HTTPS for the OpsCenter server
          • Configuring SSL/TLS between OpsCenter and the DataStax Agents
          • Connect to DSE with client-to-node encryption in OpsCenter and the DataStax Agents
          • Editing/OpsCenter cluster connections for authentication or encryption
          • SSL configuration options for OpsCenter
        • Configuring OpsCenter role-based security
        • Encrypting sensitive configuration values
          • Activating configuration encryption
          • Creating a system key to encrypt sensitive configuration values
          • Manually encrypting a configuration value
          • Deactivating configuration encryption
        • Authenticating with LDAP
          • Configuring LDAP
          • Adding a role for an LDAP user
          • Troubleshooting OpsCenter LDAP
        • Kerberos authentication
          • Configuring OpsCenter for Kerberos authentication
          • OpsCenter Kerberos configuration options
          • Troubleshooting Kerberos in OpsCenter
        • Configuring security logging
      • Configuring alerts for events
        • SNMP alerts overview
          • Enabling SNMP alerts
        • Enabling SMTP email alerts
        • Enabling alerts posted to a URL
          • Verifying that events are posting correctly
          • Posting URL alerts to a Slack channel
      • Configuring data collection and expiration
        • Controlling data collection
        • Storing collection data on a separate cluster
      • OpsCenter DSE definitions files updates
        • Updating and configuring definitions files properties
      • Automatic failover overview
        • Enabling automatic failover
        • Failover configuration options reference
      • Backing up critical configuration data
      • Configuring named route linking
      • Configuring the OpsCenter JVM
      • Configuring the DataStax Agent JVM
        • Setting and securing the tmp directory for the DataStax Agent
        • Encrypting JMX communications
      • Changing the replication strategy for the OpsCenter keyspace
      • Configuration files for OpsCenter
        • OpsCenter configuration properties
          • Statistics reporter properties
        • Cluster configuration properties
          • Cassandra connection properties
          • Metrics Collection Properties
        • DataStax Agent configuration
        • OpsCenter logback.xml configuration
      • Customize scripts for starting and stopping DataStax Enterprise
      • Example configuration scenarios
        • Configuring for multiple regions
        • Configuring for very large clusters
    • Using OpsCenter
      • OpsCenter workspace overview
        • Ring View
        • List View
        • DataStax Agents Status View
        • Nodes Detail View
          • Node management operations
      • Configuring alerts
        • Adding an alert for agent issues
          • Troubleshooting DataStax Agent Issues
        • Adding an alert for down nodes
        • Configuring an alert for KMIP errors
        • Configuring an alert for percentage of in-memory usage
        • Configuring an alert for percentiles
      • Monitoring node operations
        • Viewing the Spark Console
        • Monitoring in-memory usage
        • Viewing logs from node details
      • Managing and maintaining nodes
        • Running cleanup
        • Performing garbage collection
        • Running compaction
        • Flushing tables
        • Decommission a node
        • Draining a node
        • Moving a node
        • Running a manual repair
        • Configure an alias for a node
      • Starting and stopping DSE
        • Starting DSE on a node
        • Stopping DSE on a node
        • Restarting DSE on a node
      • Managing keyspaces and tables
        • Keyspaces
          • Managing a keyspace
          • Managing tables
        • Browsing data deprecated
      • Cluster administration
        • Adding an existing cluster
        • Disconnecting a cluster from OpsCenter and Lifecycle Manager
        • Rebalancing a cluster overview
          • Rebalancing a cluster
          • Configuring an alert for rebalancing a cluster
        • Restarting a cluster
        • Changing the display name of a cluster
        • Downloading diagnostic data
          • Diagnostic tarball reference
          • Creating an alternate directory for diagnostic information
        • Downloading Insights diagnostic data
        • Generating a cluster report
      • OpsCenter Metrics Tooltips Reference
        • Dashboard performance metrics
        • Performance metrics overview
          • Working with metrics performance graphs
          • Organizing performance metrics presets
          • Exporting and importing dashboard presets
        • Cluster performance metrics
        • Pending task metrics
          • Pending task metrics for writes
          • Pending task metrics for reads
          • Pending task metrics for cluster operations
        • Table performance metrics
        • Tiered storage performance metrics
          • Configuring tiered storage metric graphs
          • Configuring tiered storage alerts
        • Message latency metrics
          • Adding dashboard graphs for datacenter and node messaging latency
          • Adding alerts for DC and node message latency
        • Search performance metrics
        • Graph metrics
        • NodeSync metrics
        • Thread Pool (TP) metrics
          • Viewing TP stats in Node Details
          • Enabling network backpressure
        • Dropped Messages metrics
        • Operating system performance metrics
        • Alert metrics
          • Advanced system alert metrics
    • OpsCenter 6.8 Reference
      • OpsCenter ports reference
      • Installation and configuration locations
        • Default file locations for package installations
        • Default file locations tarball installations
      • Starting, stopping, and restarting OpsCenter
        • Startup log for OpsCenter
      • Stopping, starting, and restarting DataStax Agents
    • DSE Management Services
      • Backup Service
        • Quick Video Tour: Backup Service
        • Adding a backup location
          • Adding a local file system backup location
          • Adding an Amazon S3 backup location
          • Adding an Azure backup location
        • Backing up data
          • Backing up a cluster
          • Backing up to Amazon S3
          • Backing up and restoring DataStax Graphs in OpsCenter
          • Viewing backup and restore history
          • Synchronizing backup data after an upgrade
          • Deleting backup data
        • Restoring a cluster
          • Restoring from a backup
          • Restoring a backup to a specific point-in-time
          • Monitoring sufficient disk space for restoring backups
        • Cloning cluster data
          • Cloning cluster data from a defined other location
          • Cloning cluster data from clusters managed by the same OpsCenter instance
        • Configuring the Backup Service
          • Configuring commit log backups
          • Configuring the free disk space threshold for backups
          • Configuring encryption key storage for backups
          • Configuring custom scripts to run before and after backups
          • Configuring restore to continue after a download failure
          • Backup Service configuration options
        • Troubleshooting Backup Service errors
      • NodeSync Service
        • Enabling NodeSync
        • Configuring the NodeSync refresh data interval
        • Viewing NodeSync Status
        • Configuring the NodeSync rate using LCM
        • NodeSync metrics
      • Repair Service
        • Repair Service overview
          • Subrange repairs overview
          • Distributed subrange overview
          • Incremental repairs overview
          • Repair Service behavior during environment changes
          • Estimating remaining repair time
        • Turning the Repair Service on
        • Turning the Repair Service off
        • Viewing repair status
        • Basic repair configuration
          • Configuring incremental repairs
          • Excluding keyspaces or tables from subrange repairs
          • Enabling distributed subrange repairs
          • Logging for the Repair Service
          • Basic Repair Service configuration reference
        • Advanced repair configuration
          • Adjusting or disabling the throttle for subrange repairs
          • Running validation compaction sequentially
          • Advanced Repair Service configuration reference
        • Expert repair configuration
          • Setting the maximum for parallel subrange repairs
          • Expert Repair Service configuration reference
          • Tuning Repair Service for multi-datacenter environments
        • Expedited Repair Service configuration
        • Troubleshoot Repair Service errors
        • Learn more about repairs
      • Capacity Service
        • Forecasting trends for metric graphs
        • Advanced forecast configuration
      • Best Practice Service
        • Configuring Best Practice service rules
        • Monitoring the results of Best Practice service scans
        • Best Practice Rules Reference
      • Performance Service
        • Performance Service Overview
        • Why use the OpsCenter Performance Service?
        • Enabling the OpsCenter Performance Service
        • Disabling the OpsCenter Performance Service
        • Setting permissions for the OpsCenter Performance Service
        • Tuning a database cluster with the Performance Service
          • Identifying and tuning slow queries
    • Identifying poorly performing tables
    • Monitoring node thread pool statistics
    • Troubleshooting OpsCenter
    • Lifecycle Manager
      • Overview of Lifecycle Manager
        • Supported capabilities
        • Defining the topology
        • Using configuration profiles
        • Defining repositories
        • Running jobs in LCM
          • Job types in LCM
          • Job concurrency in LCM
        • Monitoring job status
      • Installing DSE using LCM
        • Accessing OpsCenter Lifecycle Manager
        • Creating custom data directories
        • Adding SSH credentials
        • Adding a configuration profile
        • Adding a repository
        • Defining the cluster topology
          • Adding a cluster
          • Adding a datacenter
          • Adding a node
        • Running an installation job
        • Viewing job details
        • Using LCM in an offline environment
          • Required software for offline DSE installs
          • Downloading DSE in an offline environments
      • Managing SSH credentials
        • Adding SSH credentials
        • Editing SSH credentials
        • Deleting SSH credentials
        • Configuring SSH connection thresholds for LCM jobs
      • Managing configuration profiles
        • Adding a configuration profile
        • Editing a configuration profile
        • Customizing configuration profile files
        • Cloning a configuration profile
        • Deleting a configuration profile
        • Configuring an HTTP or HTTPS proxy
      • Configuring repositories
        • Adding a repository
        • Editing a repository
        • Deleting a repository
      • Defining DSE topologies
        • Managing cluster topologies
          • Adding a cluster
          • Editing a cluster
          • Deleting a cluster
          • Importing a cluster topology
        • Managing datacenter topologies
          • Adding a datacenter
          • Editing a datacenter
          • Deleting a datacenter
        • Managing node topologies
          • Adding a node
          • Editing a node
          • Deleting a node
      • Running LCM jobs
        • Running an installation job
        • Running an configure job
        • Running an upgrade job
          • Example: Upgrading DSE to a minor release using LCM
        • Aborting a job
        • Adjusting idle timeout
      • Configuring Java options
        • Choosing a Java vendor in LCM
        • Managing Java installs
        • Configuring JVM options for DSE using LCM
      • Configuring DSE security using LCM
        • Native transport authentication schemes and limitations in LCM
          • Configuring row-level access control
        • Configuring SSL/TLS for DSE
        • Configuring a JMX Connection to DSE
      • Lifecycle Manager configuration options
      • Configuration known issues and limitations
      • Using advanced configurations with LCM
        • Exporting metrics collection
        • Configuring AlwaysOn SQL
        • Configuring DSE Graph
        • Configuring the NodeSync rate
        • Configuring tiered storage
    • OpsCenter API reference for developers
      • Enable and access the Datastax Agent API
      • Authentication
      • OpsCenter configuration
      • Retrieving cluster and node information
      • Performing Cluster Operations
      • Managing Keyspaces and Tables
      • Retrieving Metric Data
      • Managing Events and Alerts
      • Schedule management
      • Backup Management and Restoring from Backups
      • Best Practice Rules
      • Hadoop
      • Spark
      • Managing Performance Service Configuration
      • User Interface
      • Agent Install and Status
      • Cluster Lifecycle Management
      • DataStax Agent API example curl commands
  • DataStax Enterprise OpsCenter 6.8
  • OpsCenter API reference for developers
  • Backup Management and Restoring from Backups

Backup Management and Restoring from Backups

With these methods, you can run backups immediately, view the backups that currently exist in the cluster, and restore from a backup. Scheduling a backup to run periodically can be done through the scheduling api.

Managing Backups Methods

List backup activity.

GET /{cluster_id}/backup-activity

List backups in the cluster.

GET /{cluster_id}/backups

List backups for a keyspace in the cluster.

GET /{cluster_id}/backups/{ks_name}

Run a backup immediately.

POST /{cluster_id}/backups/run

Sync a snapshot to a destination.

POST /{cluster_id}/backups/sync

Delete an existing backup.

DELETE /{cluster_id}/backups

Get commitlog archiving config

GET /{cluster_id}/backups/pit

Enable commitlog archiving

POST /{cluster_id}/backups/pit

Disable commitlog archiving

DELETE /{cluster_id}/backups/pit

List most recent commitlog backup for each node

GET /{cluster_id}/backups/pit/logs

Restoring from Backups

Methods

Restore all data from a backup.

POST /{cluster_id}/backups/restore/{tag}

Restore a specific keyspace from a backup.

[POST /{cluster_id}/backups/restore/{tag}/{{ksname}]

Restore a specific table from a backup.

POST /{cluster_id}/backups/restore/{tag}/{ksname}/{cfname}

Validate a point in time to restore to

POST /{cluster_id}/backups/pit_check

Restore to a specific point in time

POST /{cluster_id}/backups/pit_check

Managing Destinations

Methods

List all the destinations.

GET /{cluster_id}/backups/destinations

List a specific destination.

GET /{cluster_id}/backups/destinations/{destination_id}

Add or update a destination.

POST /{cluster_id}/backups/destinations

Delete a destination.

DELETE /{cluster_id}/backups/destinations/{destination_id}

Managing Backups

GET /{cluster_id}/backup-activity

Get a list of backups that exist in the cluster.

Path argument: cluster_id: The ID of a cluster returned from GET /cluster-configs.

Optional parameters:

  • count: Number of backup events to return.

  • reverse: If set to 1, reverse the order results are returned.

  • timestamp: Events that happened ⇐ timestamp will be returned. The reverse flag changes this to be >=.

  • filter_type: Return only events of the specified type.

  • filter_live: If set to 1, return only backups that have not been deleted.

  • filter_success: If set to 1, return only events that have successfully completed.

  • first_backup_id: If provided any records before the indicated backup_id are not included in the results.

Returns a list of backup events for the cluster.

Example:

 curl http://127.0.0.1:8888/Test_Cluster/backup-activity?count=6

Output:

        [
            {
                week: "201711",
                destination: {
                    path: "",
                    provider: "server",
                    id: "OPSC_ON_SERVER"
                },
                type: "backup",
                deleted_at: null,
                backup_id: "opscenter_adhoc_2017-03-17-15-06-09-UTC",
                keyspaces: {
                    OpsCenter: [
                        "bestpractice_results",
                        "rollup_state",
                        "settings",
                        "pdps",
                        "rollups7200",
                        "rollups86400",
                        "backup_reports",
                        "events_timeline",
                        "rollups60",
                        "events",
                        "rollups300"
                    ],
                },
                event_time: 1489763169,
                status: "success"
            },
            {
                week: "201711",
                destination: {
                    throttle_bytes_per_second: "0",
                    delete_this: "False",
                    path: "orion-backups-2",
                    server_side_encryption: false,
                    provider: "s3",
                    id: "140a4904e0da4e4e9e3dcbf8d21b56d6"
                },
                full_status: {
                    destinations: [
                        "140a4904e0da4e4e9e3dcbf8d21b56d6"
                    ],
                    started: 1489763169,
                    finished: null,
                    cluster_id: "Test_Cluster",
                    keyspaces: {
                        OpsCenter: [
                            "bestpractice_results",
                            "rollups60",
                            "events"
                        ],
                    },
                    details: {
                        message: ""
                        subrequests: {
                            127.0.0.1: {
                                started: 1489763169,
                                finished: null,
                                cluster_id: null,
                                details: {
                                    metadata: {
                                        created: false,
                                        errors: [ ]
                                    },
                                    sstables: {
                                        OpsCenter: {
                                            bestpractice_results: {
                                                done_files: 0,
                                                total_files: 0,
                                                total_size: 0,
                                                errors: [ ]
                                            },
                                            rollups60: {
                                                done_files: 0,
                                                total_files: 6,
                                                total_size: 88123,
                                                errors: [ ]
                                            },
                                            events: {
                                                done_files: 0,
                                                total_files: 6,
                                                total_size: 5677,
                                                errors: [ ]
                                            }
                                        }
                                    },
                                    id: "1789233b-b9b0-450d-bfaf-42729a3776e1",
                                    state: "running"
                                }
                            },
                    },
                    id: "777452d0-5b40-4fb7-bd66-08c02b462476",
                    state: "running",
                    tag: "opscenter_adhoc_2017-03-17-15-06-09-UTC"
                },
                type: "backup",
                deleted_at: null,
                backup_id: "opscenter_adhoc_2017-03-17-15-06-09-UTC",
                request_id: "777452d0-5b40-4fb7-bd66-08c02b462476",
                event_time: 1489763169,
                status: "running"
            }
        ]

GET /{cluster_id}/backups

Get a list of backups that exist in the cluster.

Path argument: cluster_id: The ID of a cluster returned from GET /cluster-configs.

Optional parameters:

  • match: A job-schedule ID to limit backups to those created by a particular backup schedule.

  • last_seen: A Unix timestamp to limit backups to those created before the timestamp. Use with amount (below) to page the results of this query.

  • amount: Number of backups to return.

  • destination: Id of a destination from which to get the snapshots

  • list_all: If set to 1, a single agent will get the information for all backups on a destination

Returns a dictionary describing backups in the cluster. Each key in the dictionary is the ID of the backup and each value is a dictionary describing the backup.

Example:

  curl http://127.0.0.1:8888/Test_Cluster/backups?last_seen=1334857272

Output:

        {
          "opscenter_adhoc_2012-04-19-17-41-12-UTC": {
            "id": "adhoc",
              "keyspaces": {
                  "OpsCenter": {
                        "cfs": [
                            "events",
                            "events_timeline",
                            "rollups60",
                            ...
                        ],
                        "nodes": [
                            "127.0.0.1"
                        ],
                        "size": 23180
                    },
                    "system": {
                        "cfs": [
                            "LocationInfo",
                            "Schema",
                            ...
                        ],
                        "nodes": [
                            "127.0.0.1"
                        ],
                        "size": 48961
                    },
                    "test": {
                        "cfs": [
                            "cf1",
                            "cf2"
                        ],
                        "nodes": [
                            "127.0.0.1"
                        ],
                        "size": 4543
                    }
                },
                "time": 1334857272
            }
        }

GET /{cluster_id}/backups/{ks_name}

Get a list of backups that exist for a keyspace in the cluster.

Path arguments:

  • cluster_id: The ID of a cluster returned from GET /cluster-configs.

  • ks_name: The keyspace scheduled for backup.

Returns data in the same format as get-backups.

POST /{cluster_id}/backups/run

Run a one time backup immediately.

Path arguments:

  • cluster_id: The ID of a cluster returned from GET /cluster-configs.

  • body: A JSON dictionary containing the options to use for running this one-time backup.

Returns a request ID.

Example: Store backup locally

Start a backup of two keyspaces immediately.

        curl -X POST
          http://127.0.0.1:8888/Test_Cluster/backups/run
          -d '{"keyspaces": ["Keyspace1", "Keyspace2"]}'

Returns a request ID.

Output:

 "fee2232c-48ac-11e2-b1b9-e0b9a54a6d93"

Example: Store backup to a destination

Start a backup of two keyspaces immediately to a destination with destination_id. You can backup to multiple destinations by passing in additional destination IDs to the destinations object.

However, any destinations specified in the destinations object are deleted after the backup has completed.

 curl -X POST
   http://127.0.0.1:8888/Test_Cluster/backups/run
   -d '{"keyspaces": ["Keyspace1", "Keyspace2"], "destinations":{"fe85800f3f4043a88fbe76fc45b22b19":{}}}'

Returns a request ID.

Output:

 "fee2232c-48ac-11e2-b1b9-e0b9a54a6d93"

You can schedule a backup in the future using the create-scheduled-job. Specify an interval=-1 and interval_unit=null.

POST /{cluster_id}/backups/sync

Sync a snapshot to a destination.

Path arguments:

  • cluster_id: The ID of a cluster returned from GET /cluster-configs.

  • body: A JSON dictionary containing tag and destination information for the sync operation

Returns a request ID.

Example: Sync snapshot to a destination

You can backup to multiple destinations by passing in additional destination IDs to the destinations object. It’s important to note, however, that any destinations specified in the destinations object will be deleted after the backup has completed.

 curl -X POST
   http://127.0.0.1:8888/Test_Cluster/backups/sync
   -d '{"tag": "opscenter_adhoc_2017-07-28-20-04-40-UTC",     "destinations":{"fe85800f3f4043a88fbe76fc45b22b19":{}}}'

Output:

Returns a request ID.

"fee2232c-48ac-11e2-b1b9-e0b9a54a6d93"

DELETE /{cluster_id}/backups

Delete a backup from a destination. Path arguments:

  • tag: The ID of a backup to restore. This must match one of the IDs returned by get-backups.

  • destination: The destination from which the backup should be deleted. If not specified the local backup is to be deleted.

  • * remove_destination*: A boolean indicating whether the specified destination should also be deleted once the backup has been deleted. If not specified this value is assumed to be false.

Example: Deleting a backup from a destination

 BACKUP='opscenter_adhoc_2015-10-15-21-48-47-UTC'
 DESTINATION_ID='bdcff9240b614ebda64938bafb2abb09'
 curl -X DELETE
 http://127.0.0.1:8888/Test_Cluster/backups?tag=$BACKUP&destination=$DESTINATION_ID&remove_destination=true

Returns a request ID.

Output:

 "b8a8167f-5a02-425a-afbd-036ecd71846a"

GET /{cluster_id}/backups/pit

Returns the current commitlog archiving config.

Path arguments: * cluster_id: The ID of a cluster returned from GET /cluster-configs.

Example:

 curl http://127.0.0.1:8888/Test_Cluster/backups/pit

Output:

        {
          "enabled": true,
          "destinations": {
            "e2721f3b8a294eeb9684cbefe7536be4": {"compressed": false },
            "OPSC_ON_SERVER": {"compressed": false }
          }
        }

POST /{cluster_id}/backups/pit

Enable commitlog archiving.

Path arguments:

  • cluster_id: The ID of a cluster returned from GET /cluster-configs.

  • body: A JSON dictionary of options, including:

    • destinations: A dictionary describing the destinations to which commitlog backups should be copied.

    • backup_staging_dir: The directory where commitlogs are copied after they are written to disk from DSE.

    • backup_storage_dir: The directory where On Server commitlog are stored after being copied to all configured destinations.

    • sleep`: Number of seconds to sleep between each node during the rolling restart after the change has been applied.

    • drain_first: Controls whether nodes are drained before they are restarted.

Returns the request ID of the rolling restart triggered after enabling commitlog backups.

Example:

 curl -X POST
   http://127.0.0.1:8888/Test_Cluster/backups/pit
   -d '{
     "destinations": {
       "OPSC_ON_SERVER": { "compressed": false },
       "9e626c6098ab48e9bcfb8f3d60dbf9ff": {
         "compressed":true,
         "throttle":10
       }
     },
     "backup_staging_dir": "/var/backup/staging",
     "backup_storage_dir": "/var/backup/storage",
     "sleep":5,
     "drain_first":false
   }'

Output:

 "55851b8b-fe06-4cf3-8981-5b81f86bb06d"

DELETE /{cluster_id}/backups/pit

Disable commitlog archiving

Path arguments:

  • cluster_id: The ID of a cluster returned from GET /cluster-configs.

  • body: A JSON dictionary of options, including:

    • sleep: Number of seconds to sleep between each node during the rolling restart after the change has been applied.

    • drain_first: Controls whether nodes are drained before they are restarted.

Returns the request ID of the rolling restart triggered after disabling commitlog backups.

Example:

 curl -X DELETE
   http://127.0.0.1:8888/Test_Cluster/backups/pit
   -d '{
     "sleep": 5,
     "drain_first": false
   }'

Output:

 "55851b8b-fe06-4cf3-8981-5b81f86bb420"

GET /{cluster_id}/backups/pit/logs

Returns a dictionary of each node and a timestamp in seconds of its most recently backed up commitlog. This information indicates what the most recent time is to which a point in time restore can be executed.

Path arguments: cluster_id: The ID of a cluster returned from GET /cluster-configs.

Example:

 curl -X GET
   http://127.0.0.1:8888/Test_Cluster/backups/pit/logs

Output:

{
  "10.240.0.3": 1450135082.502205,
  "10.240.0.4": 1450135124.02664
}

Restoring from Backups

POST /{cluster_id}/backups/restore/{tag}

Restore all data from a backup.

Path arguments:

  • cluster_id: The ID of a cluster returned from GET /cluster-configs.

  • tag: The ID of a backup to restore. This must match one of the IDs returned by get-backups.

  • body: A JSON dictionary of options, including:

    • throttle: The streaming limit in MB/second. The default behavior is no throttle.

    • excluded-nodes: The list of nodes to exclude from the restore process.

    • force: True or false. True ignores problems, such as some nodes or agents being down, that normally abort restoration.

    • force_schema: True or false. True ignores schema problems that normally abort restoration.

    • destination: (optional) Destination ID to restore from. Leave blank if restoring from on server. Must be a destination ID in the cluster config (list-destinations)

    • keyspaces: A dictionary mapping keyspace names to a dictionary of options specific to that keyspace. If this parameter is omitted, all keyspaces will be restored. If it is present, only the keyspaces listed in the dictionary will be restored. The set of accepted options per-keyspace include the following:

    • column-families: A list of specific tables to restore. If omitted, all tables will be restored.

    • truncate: True or false. True first truncates all tables that will be restored. By default, tables are not truncated before restoration.

    • use_sstableloader: True or false. Defaults to true. If true, sstableloader is used to load that snapshot data into the cluster. If false, sstables for the snapshot will replace sstables currently in place. If not set or set to false, truncate must be set to true.

    • restart_pause: The number of seconds to wait between restarting each node if a rolling restart is needed. Defaults to 60.

    • keyspace_remappings: A map where the keys are the names of existing keyspaces in the snapshot and the values are the names of the keyspaces to restore to in the target cluster.

Returns a request ID.

Example: Restore from on server

        BACKUP='opscenter_4a269167-96c1-40c7-84b7-b070c6bcd0cd_2012-06-07-18-00-00-UTC'
        curl -X POST
            http://192.168.1.1:8888/Test_Cluster/backups/restore/$BACKUP
            -d '{
              "throttle": 10,
              "excluded-nodes": [
                "192.168.100.7"
              ],
              "keyspaces": {
                "Keyspace1": {
                  "column-families: ["users", "dates"],
                  "truncate": true
                },
                "OpsCenter": {
                  "truncate": false
                }
              },
            }'

Output:

 "fee2232c-48ac-11e2-b1b9-e0b9a54a6d93"

Example: Restore from a destination

        BACKUP='opscenter_4a269167-96c1-40c7-84b7-b070c6bcd0cd_2012-06-07-18-00-00-UTC'
        curl -X POST
            http://192.168.1.1:8888/Test_Cluster/backups/restore/$BACKUP
            -d '{
              "destination": "fe85800f3f4043a88fbe76fc45b22b19",
              "throttle": 10,
              "excluded-nodes": [
                "192.168.100.7"
              ],
              "keyspaces": {
                "Keyspace1": {
                  "column-families: ["users", "dates"],
                  "truncate": true
                },
                "OpsCenter": {
                  "truncate": false
                }
              },
            }'

Output:

 "fee2232c-48ac-11e2-b1b9-e0b9a54a6d93"

POST /{cluster_id}/backups/restore/{tag}/{ksname}

Restore a keyspace from a backup.

Path arguments:

  • cluster_id: The ID of a cluster returned from GET /cluster-configs.

  • tag: The ID of a backup to restore. This must match one of the IDs returned by get-backups.

  • ksname: A keyspace to restore.

  • body: A JSON dictionary of options, including:

    • throttle: The streaming limit in MB/second. The default behavior is no throttle.

    • excluded-nodes: The list of nodes to exclude from the restore process.

    • force: True or false. True ignores problems, such as some nodes or agents being down, that normally abort restoration.

    • destination: Optional: Destination ID to restore from. Leave blank if restoring from on server. Must be a destination ID in the cluster config (list-destinations)

    • column-families: A list of specific tables to restore. If omitted, all tables will be restored.

    • truncate: True or false. True first truncates all tables that will be restored. By default, tables are not truncated before restoration.

    • use_sstableloader: True or false. Defaults to true. If true, sstableloader is used to load that snapshot data into the cluster. If false, sstables for the snapshot will replace sstables currently in place. If not set or set to false, truncate must be set to true.

Returns a request ID.

Example: Restore a keyspace from on server

        BACKUP='opscenter_4a269167-96c1-40c7-84b7-b070c6bcd0cd_2012-06-07-18-00-00-UTC'
        curl -X POST
            http://192.168.1.1:8888/Test_Cluster/backups/restore/$BACKUP/Keyspace1
            -d '{
              "throttle": 10,
              "excluded-nodes": [
                "192.168.100.7"
              ],
              "column-families: ["users", "dates"],
              "truncate": true
            }'
 "fee2232c-48ac-11e2-b1b9-e0b9a54a6d93"

Example: Restore a keyspace from a destination

        BACKUP='opscenter_4a269167-96c1-40c7-84b7-b070c6bcd0cd_2012-06-07-18-00-00-UTC'
        curl -X POST
            http://192.168.1.1:8888/Test_Cluster/backups/restore/$BACKUP/Keyspace1
            -d '{
              "throttle": 10,
              "destination": "fe85800f3f4043a88fbe76fc45b22b19",
              "excluded-nodes": [
                "192.168.100.7"
              ],
              "column-families: ["users", "dates"],
              "truncate": true
            }'

Output:

"fee2232c-48ac-11e2-b1b9-e0b9a54a6d93"

POST /{cluster_id}/backups/restore/{tag}/{ksname}/{cfname}

Restore a table from a backup.

Path arguments:

  • cluster_id: The ID of a cluster returned from GET /cluster-configs.

  • tag: The ID of a backup to restore. This must match one of the ID’s returned by get-backups.

  • ksname: A keyspace to restore.

  • cfname: A table name to restore.

  • body: A JSON dictionary of options, including:

    • throttle: The streaming limit in MB/second. The default behavior is no throttle.

    • excluded-nodes: The list of nodes to exclude from the restore process.

    • force: True or false. True ignores problems, such as some nodes or agents being down, that normally abort restoration.

    • destination: (optional) Destination ID to restore from. Leave blank if restoring from on server. Must be a destination ID in the cluster config (list-destinations)

    • truncate: True or false. True first truncates all tables that will be restored. By default, tables are not truncated before restoration.

    • use_sstableloader: True or false. Defaults to true. If true, sstableloader is used to load that snapshot data into the cluster. If false, sstables for the snapshot will replace sstables currently in place. If not set or set to false, truncate must be set to true.

Returns a request ID.

Example: Restore a specific table from a Keyspace on server

        BACKUP='opscenter_4a269167-96c1-40c7-84b7-b070c6bcd0cd_2012-06-07-18-00-00-UTC'
        curl -X POST
            http://192.168.1.1:8888/Test_Cluster/backups/restore/$BACKUP/Keyspace1/users
            -d '{
              "throttle": 10,
              "excluded-nodes": [
                "192.168.100.7"
              ],
              "truncate": true
            }'

Output:

 "fee2232c-48ac-11e2-b1b9-e0b9a54a6d93"

Example: Restore a specific table from a keyspace from a destination

        BACKUP='opscenter_4a269167-96c1-40c7-84b7-b070c6bcd0cd_2012-06-07-18-00-00-UTC'
        curl -X POST
            http://192.168.1.1:8888/Test_Cluster/backups/restore/$BACKUP/Keyspace1/users
            -d '{
              "throttle": 10,
              "destination": "fe85800f3f4043a88fbe76fc45b22b19",
              "excluded-nodes": [
                "192.168.100.7"
              ],
              "truncate": true
            }'

Output:

 "fee2232c-48ac-11e2-b1b9-e0b9a54a6d93"

POST /{cluster_id}/backups/pit_check

Validate a point in time from which to restore.

Path arguments:

  • cluster_id: The ID of a cluster returned from GET /cluster-configs.

  • body: A JSON dictionary of options, including:

    • pit: The timestamp in seconds to restore to.

    • destination: Destination containing the snapshot to use for the restore.

Example:

 curl -X POST
   http://127.0.0.1:8888/Test_Cluster/backups/pit_check
   -d '{ "pit": 1450143120, "destination": "OPSC_ON_SERVER" }'

Output:

      {
        "message": "No snapshots found before date and time: 12-15-2015 01:32:00 UTC",
        "type": "InvalidArguments",
        "brief": "error"
      }

POST /{cluster_id}/backups/pit/run/

Run a point in time restore.

Path arguments:

  • cluster_id: The ID of a cluster returned from GET /cluster-configs.

body: A JSON dictionary of options, including:

  • keyspaces: Dictionary of keyspaces to restore from the snapshot.

  • destination: (optional) Destination ID to restore from. Leave blank if restoring from on server. Must be a destination ID in the cluster config (list-destinations).

  • pit_destination: Destination containing the commitlogs to use for the restore.

  • pit: The timestamp in seconds to restore to.

  • restart_pause: (optional) The number of seconds to wait between restarting each node

Example:

 curl -X POST
   http://127.0.0.1:8888/Test_Cluster/backups/pit_check
   -d '{
          "keyspaces": {
            "Keyspace1": {
              "column-families: ["users", "dates"],
              "truncate": true
            },
            "OpsCenter": {
              "truncate": false
            }
          },
          "pit_destination": "OPSC_ON_SERVER",
          "pit":1450144260
       }'

Output:

      {
        "message": "No snapshots found before date and time: 12-15-2015 01:32:00 UTC",
        "type": "InvalidArguments",
        "brief": "error"
      }

GET /{cluster_id}/backups/graphs/{tag}/{destination_id}

Get a map of graphs to their associated keyspaces as they exist in the specified snapshot.

Path arguments:

  • cluster_id: The ID of a cluster returned from GET /cluster-configs.

  • tag: The tag of the backup snapshot as from the key values returned by (get-backups)

  • destination_id: Optional ID of the backup destination. Must be a destination ID in the cluster config (list-destinations). Default is the On Server destination.

Returns a dictionary of the keyspaces owned by a particular graph.

Example:

 curl http://127.0.0.1:8888/Test_Cluster/backups/graphs/opscenter_adhoc_2017-03-17-15-06-09-UTC/06747042-5a9a-45e7-8fa0-297abb68448f

Output:

        {
            "graph1": ["graph1_ks1", "graph1_ks2"]
            "graph2": ["graph2_ks1", "graph2_ks2", "graph2_ks3"]
        }

Managing Destinations

GET /{cluster_id}/backups/destinations

Get a list of backup destinations that exist for a specified cluster.

Path arguments: cluster_id: The ID of a cluster returned from GET /cluster-configs.

Returns a dictionary describing the destinations in the cluster. Each key in the dictionary is the ID of the backup destination.

Example:

 curl http://127.0.0.1:8888/Test_Cluster/backups/destinations

Output:

      {
          "06747042-5a9a-45e7-8fa0-297abb68448f": {
              "access_key": "AKIAIDGKF45VQXGUYIQQ",
              "access_secret": "gMizFwIoFHzIo7RrNmXUUd9zKea8hSkh6+wXLCT1",
              "path": "example-opscenter-backups-1",
              "provider": "s3"
          },
          "16747042-5a9a-45e7-8fa0-297abb68448g": {
              "access_key": "AKIAIDGKF45VQXGUYIQQ",
              "access_secret": "gMizFwIoFHzIo7RrNmXUUd9zKea8hSkh6+wXLCT1",
              "path": "example-opscenter-backups-2",
              "provider": "s3"
          }
      }

GET /{cluster_id}/backups/destinations/{destination_id}

Get information about a destination

Path arguments:

  • cluster_id: The ID of a cluster returned from GET /cluster-configs.

  • destination_id: The ID of the backup destination. Must be a destination ID in the cluster config (list-destinations)

Returns a dictionary describing the attributes of the specific backups destination in the cluster.

Example:

 curl http://127.0.0.1:8888/Test_Cluster/backups/destinations/06747042-5a9a-45e7-8fa0-297abb68448f

Output:

        {
            "access_key": "AKIAIDGKF45VQXGUYIQQ",
            "access_secret": "gMizFwIoFHzIo7RrNmXUUd9zKea8hSkh6+wXLCT1",
            "path": "example-opscenter-backups-1",
            "provider": "s3"
        }

POST /{cluster_id}/backups/destinations

Adds or updates a destination in the cluster. This will also perform validation on the destination before adding a destination. To update an existing destination, include id: the-id, where the-id is a destination listed from list-destinations, in the JSON body. You can also pass in the key delete_this with a value of true to delete a destination. If the destination only works from nodes in specific datacenters, the datacenters can be specified via the validation_dc_list in the body.

Path arguments: cluster_id: The ID of a cluster returned from GET /cluster-configs.

Returns an array of dictionaries describing the attributes of the updated backup destinations in the cluster and the request request_id of the request that updates all the agents with the new destination.

Example: Add New S3 Destination

 curl -X POST
      http://127.0.0.1:8888/Test_Cluster/backups/destinations
      -d '{
         "access_key": "AKIAIDGKF45VQXGUYIQQ",
         "access_secret": "gMizFwIoFHzIo7RrNmXUUd9zKea8hSkh6+wXLCT1",
         "path": "example-opscenter-backups-1",
         "provider": "s3",
         "validation_dc_list": ["dc2"]
      }'

Output:

{
    "destination": [
        {
            destination_id: {
                "access_key": "AKIAIDGKF45VQXGUYIQQ",
                "access_secret": "gMizFwIoFHzIo7RrNmXUUd9zKea8hSkh6+wXLCT1",
                "path": "example-opscenter-backups-1",
                "provider": "s3",
                "validation_dc_list": ["dc2"]
            }
        }
    ],
    request_id: "06747042-5a9a-45e7-8fa0-297abb68448f"
}

Example: Add New Azure Destination

 curl -X POST
      http://127.0.0.1:8888/Test_Cluster/backups/destinations
      -d '{
         "storage_key":  "gRmx1ersub92sfgTy87Ar/sYb8LkMv4HrMx8pQS5yuiaZQMRrwko084xbMx02vaXCo+cZ /DNKdYs+shg2ogoUA==",
         "storage_account_name": "azurebackups",
         "container_name": "example-opscenter-backups-1",
         "subfolder": "my/backups",
         "provider": "azure"
      }'

Output:

       {
            "destination": [
                 {
                     destination_id: {
                         "storage_key": "gRmx1ersub92sfgTy87Ar/sYb8LkMv4HrMx8pQS5yuiaZQMRrwko084xbMx02vaXCo+cZ/DNKdYs+shg2ogoUA==",
                         "storage_account_name": "azurebackups",
                         "container_name": "example-opscenter-backups-1",
                         "subfolder": "my/backups",
                         "provider": "azure"
                      }
                  }
            ],
            request_id: "06747042-5a9a-45e7-8fa0-297abb68448f"
        }

Example: Edit Existing Destination

 curl -X POST
      http://127.0.0.1:8888/Test_Cluster/backups/destinations
      -d '{
         "id": "06747042-5a9a-45e7-8fa0-297abb68448f",
          "access_key": "AKIAIDGKF45VQXGUYIQQ",
          "access_secret": "gMizFwIoFHzIo7RrNmXUUd9zKea8hSkh6+wXLCT1",
          "path": "example-opscenter-backups-1",
          "provider": "s3",
          "delete_this": false
    }'

Output:

       {
            "destination": [
                {
                    destination_id: {
                        "access_key": "AKIAIDGKF45VQXGUYIQQ",
                        "access_secret": "gMizFwIoFHzIo7RrNmXUUd9zKea8hSkh6+wXLCT1",
                        "path": "example-opscenter-backups-1",
                        "provider": "s3"
                    },
                }
            ],
            request_id: "06747042-5a9a-45e7-8fa0-297abb68448f"
        }

DELETE /{cluster_id}/backups/destinations/{destination_id}

Deletes a backup destination for a cluster.

Path arguments:

  • cluster_id: The ID of a cluster returned from GET /cluster-configs.

  • destination_id: The ID of the destination to delete. Must be a destination ID in the cluster config (list-destinations).

Returns a request ID that removes the destination from all agents.

Example:

 curl -X DELETE
   http://127.0.0.1:8888/Test_Cluster/backups/destinations/fee2232c-48ac-11e2-b1b9-e0b9a54a6d93

Output:

 "06747042-5a9a-45e7-8fa0-297abb68448f"
Schedule management Best Practice Rules

General Inquiries: +1 (650) 389-6000 info@datastax.com

© DataStax | Privacy policy | Terms of use

DataStax, Titan, and TitanDB are registered trademarks of DataStax, Inc. and its subsidiaries in the United States and/or other countries.

Apache, Apache Cassandra, Cassandra, Apache Tomcat, Tomcat, Apache Lucene, Apache Solr, Apache Hadoop, Hadoop, Apache Pulsar, Pulsar, Apache Spark, Spark, Apache TinkerPop, TinkerPop, Apache Kafka and Kafka are either registered trademarks or trademarks of the Apache Software Foundation or its subsidiaries in Canada, the United States and/or other countries.

Kubernetes is the registered trademark of the Linux Foundation.

landing_page landingpage