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
ScyllaDB Docs Scylla Manager CLI sctool Restore

Restore¶

The restore commands allow you to create and update a restore (ad-hoc or scheduled).

restore¶

This command allows you to run an ad-hoc restore. Restore is always one of two types: restore schema (’–restore-schema’ flag) or restore tables’ contents (’–restore-tables’ flag). In both cases, for the restore effects to be visible, you need to perform a specific follow-up action described by selected type.

Syntax¶

sctool restore --cluster <id|name> --location [<dc>:]<provider>:<bucket> --snapshot-tag <tag> [flags]

Command options¶

--batch-size¶

Number of SSTables per shard to process in one request by one node. Increasing batch size increases job granularity.

Default value: 2

-c, --cluster¶

The target cluster name or ID (envvar SCYLLA_MANAGER_CLUSTER).

--cron¶

Task schedule as a cron expression. It supports the extended syntax including @monthly, @weekly, @daily, @midnight, @hourly, @every X[h|m|s].

--dry-run¶

Validates and displays restore information without actually running the restore. This allows you to display what will happen should the restore run with the parameters you set.

Default value: false

--enabled¶

Not enabled tasks are not executed and are hidden from the task list.

Default value: true

-h, --help¶

help for restore

Default value: false

-i, --interval¶

–interval is deprecated, please use –cron instead

Time after which a successfully completed task would be run again. The supported units are:

  • ‘d’ - days

  • ‘h’ - hours

  • ‘m’ - minutes

  • ‘s’ - seconds

  • ‘ms’ - milliseconds

The task run date is aligned with ‘–start date’ value. For example, if you select ‘–interval 7d’ task would run weekly at the ‘–start-date’ time.

-K, --keyspace¶

A list of glob patterns separated by a comma used to include or exclude tables. The patterns match keyspaces and tables, separate the keyspace name from the table name with a dot e.g. ‘keyspace,!keyspace.table_prefix_*’. The following syntax for glob patterns is supported:

  • ‘*’ - matches any number of any characters including none

  • ‘?’ - matches any single character

  • ‘[abc]’ - matches one character given in the bracket

  • ‘[a-z]’ - matches one character from the range given in the bracket

Patterns are evaluated from left to right. If a pattern starts with ‘!’ it unselects items that were selected by previous patterns i.e. ‘a?,!aa’ selects ab but not aa.

Default value: []

-L, --location¶

A list of backup locations separated by a comma, specifies places where restored backup is stored.

The format is [<dc>:]<provider>:<bucket>. The <dc> parameter is optional. It allows you to specify the datacenter whose nodes will be used to restore the data from this location in a multi-dc setting, it must match Scylla nodes datacenter. By default, all live nodes are used to restore data from specified locations.

Note that specifying datacenters closest to backup locations might reduce download time of restored data. The supported storage ‘<provider>’s are ‘azure’, ‘gcs’, ‘s3’. The <bucket> parameter is a bucket name, it must be an alphanumeric string and may contain a dash and or a dot, but other characters are forbidden.

Default value: []

--name¶

Task name that can be used insead of ID.

-r, --num-retries¶

Number of times a task reruns following a failure.

Default value: 3

--parallel¶

The maximum number of Scylla restore jobs that can be run at the same time (on different SSTables). Each node can take part in at most one restore at any given moment.

Default value: 1

--restore-schema¶

Specifies restore type (alternative to ‘–restore-tables’ flag). Restore will recreate schema by targeting ‘system_schema.*’ tables only (’–keyspace’ flag mustn’t be set). It requires that restored keyspaces aren’t present in the cluster. For the schema to be visible, restart of the entire cluster is required after completion. See ScyllaDB cluster restart: https://docs.scylladb.com/stable/operating-scylla/procedures/config-change/rolling-restart.html for details.

Default value: false

--restore-tables¶

Specifies restore type (alternative to ‘–restore-schema’ flag). Restore will recreate contents of tables specified by ‘–keyspace’ flag. It requires that correct schema of restored tables is already present in the cluster (schema can be restored using ‘–restore-schema’ flag). Moreover, in order to prevent situation in which current tables’ contents overlaps restored data, tables should be truncated before initializing restore. For the table contents to be visible, repair of the entire cluster is required after completion. See sctool repair: https://manager.docs.scylladb.com/stable/sctool/repair.html#sctool-repair for details.

Default value: false

--retry-wait¶

Initial exponential backoff duration X[h|m|s]. With –retry-wait 10m task will wait 10 minutes, 20 minutes and 40 minutes after first, second and third consecutire failure.

Default value: 10m

--show-tables¶

Prints table names together with keyspace, used in combination with –dry-run.

Default value: false

-T, --snapshot-tag¶

Scylla Manager snapshot tag identifying restored backup. Snapshot tags can be obtained from backup listing (‘./sctool backup list’ command - e.g. sm_20060102150405UTC).

-s, --start-date¶

–start-date is deprecated, please use –cron instead

The date can be expressed relatively to now or as a RFC3339 formatted string. To run the task in 2 hours use ‘now+2h’. The supported units are:

  • ‘d’ - days

  • ‘h’ - hours

  • ‘m’ - minutes

  • ‘s’ - seconds

  • ‘ms’ - milliseconds

If you want the task to start at a specified date use RFC3339 formatted string i.e. ‘2018-01-02T15:04:05-07:00’. If you want the repair to start immediately, use the value ‘now’ or skip this flag.

--timezone¶

Timezone of –cron and –window flag values. The default value is taken from this system, namely ‘TZ’ envvar or ‘/etc/localtime’ file.

Default value: UTC

--window¶

A comma-separated list of time markers in a form [WEEKDAY-]HH:MM. WEEKDAY can be written as the whole word or only using the first 3 characters, HH:MM is an hour from 00:00 to 23:59.

  • ‘MON-00:00,FRI-15:00’ - can be executed from Monday to Friday 3PM

  • ‘23:00,06:00’ - can be executed every night from 11PM to 6AM

  • ‘23:00,06:00,SAT-00:00,SUN-23:59’ - can be executed every night from 11PM to 6AM and all day during the weekend

Default value: []

--api-cert-file

File path to HTTPS client certificate used to access the Scylla Manager server when client certificate validation is enabled (envvar SCYLLA_MANAGER_API_CERT_FILE).

--api-key-file

File path to HTTPS client key associated with –api-cert-file flag (envvar SCYLLA_MANAGER_API_KEY_FILE).

--api-url

Base URL of Scylla Manager server (envvar SCYLLA_MANAGER_API_URL).

If running sctool on the same machine as server, it’s generated based on ‘/etc/scylla-manager/scylla-manager.yaml’ file.

Default value: http://127.0.0.1:5080/api/v1

restore update¶

This command allows you to modify properties of an already existing restore task. If there is one restore task the ‘restore/task-id’ argument is not needed.

Syntax¶

sctool restore update --cluster <id|name> [flags] [<restore/task-id>]

Command options¶

--batch-size¶

Number of SSTables per shard to process in one request by one node. Increasing batch size increases job granularity.

Default value: 2

-c, --cluster¶

The target cluster name or ID (envvar SCYLLA_MANAGER_CLUSTER).

--cron¶

Task schedule as a cron expression. It supports the extended syntax including @monthly, @weekly, @daily, @midnight, @hourly, @every X[h|m|s].

--dry-run¶

Validates and displays restore information without actually running the restore. This allows you to display what will happen should the restore run with the parameters you set.

Default value: false

--enabled¶

Not enabled tasks are not executed and are hidden from the task list.

Default value: true

-h, --help¶

help for update

Default value: false

-i, --interval¶

–interval is deprecated, please use –cron instead

Time after which a successfully completed task would be run again. The supported units are:

  • ‘d’ - days

  • ‘h’ - hours

  • ‘m’ - minutes

  • ‘s’ - seconds

  • ‘ms’ - milliseconds

The task run date is aligned with ‘–start date’ value. For example, if you select ‘–interval 7d’ task would run weekly at the ‘–start-date’ time.

-K, --keyspace¶

A list of glob patterns separated by a comma used to include or exclude tables. The patterns match keyspaces and tables, separate the keyspace name from the table name with a dot e.g. ‘keyspace,!keyspace.table_prefix_*’. The following syntax for glob patterns is supported:

  • ‘*’ - matches any number of any characters including none

  • ‘?’ - matches any single character

  • ‘[abc]’ - matches one character given in the bracket

  • ‘[a-z]’ - matches one character from the range given in the bracket

Patterns are evaluated from left to right. If a pattern starts with ‘!’ it unselects items that were selected by previous patterns i.e. ‘a?,!aa’ selects ab but not aa.

Default value: []

-L, --location¶

A list of backup locations separated by a comma, specifies places where restored backup is stored.

The format is [<dc>:]<provider>:<bucket>. The <dc> parameter is optional. It allows you to specify the datacenter whose nodes will be used to restore the data from this location in a multi-dc setting, it must match Scylla nodes datacenter. By default, all live nodes are used to restore data from specified locations.

Note that specifying datacenters closest to backup locations might reduce download time of restored data. The supported storage ‘<provider>’s are ‘azure’, ‘gcs’, ‘s3’. The <bucket> parameter is a bucket name, it must be an alphanumeric string and may contain a dash and or a dot, but other characters are forbidden.

Default value: []

--name¶

Task name that can be used insead of ID.

-r, --num-retries¶

Number of times a task reruns following a failure.

Default value: 3

--parallel¶

The maximum number of Scylla restore jobs that can be run at the same time (on different SSTables). Each node can take part in at most one restore at any given moment.

Default value: 1

--restore-schema¶

Specifies restore type (alternative to ‘–restore-tables’ flag). Restore will recreate schema by targeting ‘system_schema.*’ tables only (’–keyspace’ flag mustn’t be set). It requires that restored keyspaces aren’t present in the cluster. For the schema to be visible, restart of the entire cluster is required after completion. See ScyllaDB cluster restart: https://docs.scylladb.com/stable/operating-scylla/procedures/config-change/rolling-restart.html for details.

Default value: false

--restore-tables¶

Specifies restore type (alternative to ‘–restore-schema’ flag). Restore will recreate contents of tables specified by ‘–keyspace’ flag. It requires that correct schema of restored tables is already present in the cluster (schema can be restored using ‘–restore-schema’ flag). Moreover, in order to prevent situation in which current tables’ contents overlaps restored data, tables should be truncated before initializing restore. For the table contents to be visible, repair of the entire cluster is required after completion. See sctool repair: https://manager.docs.scylladb.com/stable/sctool/repair.html#sctool-repair for details.

Default value: false

--retry-wait¶

Initial exponential backoff duration X[h|m|s]. With –retry-wait 10m task will wait 10 minutes, 20 minutes and 40 minutes after first, second and third consecutire failure.

Default value: 10m

--show-tables¶

Prints table names together with keyspace, used in combination with –dry-run.

Default value: false

-T, --snapshot-tag¶

Scylla Manager snapshot tag identifying restored backup. Snapshot tags can be obtained from backup listing (‘./sctool backup list’ command - e.g. sm_20060102150405UTC).

-s, --start-date¶

–start-date is deprecated, please use –cron instead

The date can be expressed relatively to now or as a RFC3339 formatted string. To run the task in 2 hours use ‘now+2h’. The supported units are:

  • ‘d’ - days

  • ‘h’ - hours

  • ‘m’ - minutes

  • ‘s’ - seconds

  • ‘ms’ - milliseconds

If you want the task to start at a specified date use RFC3339 formatted string i.e. ‘2018-01-02T15:04:05-07:00’. If you want the repair to start immediately, use the value ‘now’ or skip this flag.

--timezone¶

Timezone of –cron and –window flag values. The default value is taken from this system, namely ‘TZ’ envvar or ‘/etc/localtime’ file.

Default value: UTC

--window¶

A comma-separated list of time markers in a form [WEEKDAY-]HH:MM. WEEKDAY can be written as the whole word or only using the first 3 characters, HH:MM is an hour from 00:00 to 23:59.

  • ‘MON-00:00,FRI-15:00’ - can be executed from Monday to Friday 3PM

  • ‘23:00,06:00’ - can be executed every night from 11PM to 6AM

  • ‘23:00,06:00,SAT-00:00,SUN-23:59’ - can be executed every night from 11PM to 6AM and all day during the weekend

Default value: []

--api-cert-file

File path to HTTPS client certificate used to access the Scylla Manager server when client certificate validation is enabled (envvar SCYLLA_MANAGER_API_CERT_FILE).

--api-key-file

File path to HTTPS client key associated with –api-cert-file flag (envvar SCYLLA_MANAGER_API_KEY_FILE).

--api-url

Base URL of Scylla Manager server (envvar SCYLLA_MANAGER_API_URL).

If running sctool on the same machine as server, it’s generated based on ‘/etc/scylla-manager/scylla-manager.yaml’ file.

Default value: http://127.0.0.1:5080/api/v1

Was this page helpful?

PREVIOUS
Backup
NEXT
Cluster
Scylla Manager
  • 3.1
    • master
    • 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
    • restore
      • Syntax
      • Command options
        • --batch-size
        • -c, --cluster
        • --cron
        • --dry-run
        • --enabled
        • -h, --help
        • -i, --interval
        • -K, --keyspace
        • -L, --location
        • --name
        • -r, --num-retries
        • --parallel
        • --restore-schema
        • --restore-tables
        • --retry-wait
        • --show-tables
        • -T, --snapshot-tag
        • -s, --start-date
        • --timezone
        • --window
    • restore update
      • Syntax
      • Command options
        • --batch-size
        • -c, --cluster
        • --cron
        • --dry-run
        • --enabled
        • -h, --help
        • -i, --interval
        • -K, --keyspace
        • -L, --location
        • --name
        • -r, --num-retries
        • --parallel
        • --restore-schema
        • --restore-tables
        • --retry-wait
        • --show-tables
        • -T, --snapshot-tag
        • -s, --start-date
        • --timezone
        • --window
Logo
Docs University Contact Us About Us
Mail List Icon Slack Icon Forum Icon
© 2023, ScyllaDB. All rights reserved.
Last updated on 07 June 2023.
Powered by Sphinx 4.3.2 & ScyllaDB Theme 1.5.1