ScyllaDB University Live | Free Virtual Training Event
Learn more
ScyllaDB Documentation Logo Documentation
  • Server
    • ScyllaDB Open Source
    • ScyllaDB Enterprise
    • ScyllaDB Alternator
  • Cloud
  • Tools
    • ScyllaDB Manager
    • ScyllaDB Monitoring Stack
    • ScyllaDB Operator
  • Drivers
    • CQL Drivers
    • DynamoDB Drivers
Download
Menu

Caution

You're viewing documentation for an unstable version of Scylla Manager. Switch to the latest stable version.

ScyllaDB Docs Scylla Manager Restore Restore schema

Restore schema¶

Note

Currently, Scylla Manager supports only entire schema restoration, so --keyspace flag is not allowed.

Note

Because of small size of schema files, resuming schema restoration always starts from scratch.

In order to restore Scylla cluster schema use sctool restore with --restore-schema flag.

Prerequisites¶

  • Scylla Manager with CQL credentials to restore destination cluster.

  • It is strongly advised to restore schema only into an empty cluster with no schema change history of the keyspace that is going to be restored.

    Otherwise, the restored schema might be overwritten by the already existing one and cause unexpected errors.

  • All nodes in restore destination cluster should be in the UN state (See nodetool status for details).

Follow-up action¶

After successful restore it is important to perform necessary follow-up action. In case of restoring schema, you should make a rolling restart of an entire cluster. Without the restart, the restored schema might not be visible, and querying it can return various errors.

It is recommended to drop all materialized views and secondary indexes that are part of the restored schema. The next step, --restore-tables, does not restore materialized views or secondary indexes. It is the end user’s responsibility to drop and recreate them after the tables have been successfully restored.

Process¶

Because of being unable to alter schema tables tombstone_gc option, restore procedure “simulates ad-hoc repair” by duplicating data from each backed-up node into each node in restore destination cluster. Fortunately, the small size of schema files makes this overhead negligible.

  • Validate that all nodes are in the UN state

  • For each backup location:

    • Find all Scylla nodes with location access and use them for restoring schema from this location

    • List backup manifests for specified snapshot tag

  • For each manifest:

    • Filter relevant tables from the manifest

    • For each table:

      • For each node (in --parallel):

        • Download all SSTables

  • For all nodes in restore destination cluster:

    • nodetool refresh on all downloaded schema tables (full parallel)

Was this page helpful?

PREVIOUS
Restore tables
NEXT
Examples
Scylla Manager
  • master
    • master
    • 3.2
    • 3.1
    • 3.0
    • 2.6
    • 2.5
    • 2.4
    • 2.3
    • 2.2
  • Docker
  • Install ScyllaDB Manager
  • Install ScyllaDB Manager Agent
  • ScyllaDB Manager Upgrade
  • Add a Cluster
  • Backup
    • Setup Amazon S3
    • Setup S3 compatible storage
    • Setup Google Cloud Storage
    • Setup Azure Blob Storage
    • Examples
    • Specification
  • Restore
    • Restore tables
    • Restore schema
    • Examples
    • Compatibility Matrix
  • Repair
    • Repair faster
    • Repair slower
    • Examples
  • Health Check
  • CLI sctool
    • Environment variables
    • Completion
    • Download files
    • Backup
    • Restore
    • Cluster
    • Info
    • Progress
    • Repair
    • Start
    • Status
    • Stop
    • Suspend & Resume
    • Tasks
    • Version
  • Configuration Files
    • Scylla Manager Config
    • Scylla Manager Agent Config
  • Swagger File
  • ScyllaDB Monitoring
  • Troubleshooting
  • Slack
  • Create an issue
  • Edit this page

On this page

  • Restore schema
    • Prerequisites
    • Follow-up action
    • Process
Logo
Docs University Contact Us About Us
Mail List Icon Slack Icon Forum Icon
© 2023, ScyllaDB. All rights reserved.
Last updated on 26 September 2023.
Powered by Sphinx 4.3.2 & ScyllaDB Theme 1.5.1