-
Notifications
You must be signed in to change notification settings - Fork 41
/
Copy pathsctool_restore_1-1-restore.yaml
143 lines (131 loc) · 6.88 KB
/
sctool_restore_1-1-restore.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
name: sctool restore 1-1-restore
synopsis: |
Run an ad-hoc restore of tables to a cluster that mirrors the topology (DCs, racks, nodes structure and tokens) of a backup cluster.
description: "This command allows you to run ad-hoc restore of tables to a cluster that mirrors the topology of a backup cluster. This means that the target cluster must have \nthe same number of nodes in each datacenter and rack, as well as the same token assignment for each node. \n**Note:** This command only restores the data within the tables. \nYou must first restore the schema of the database separately using the regular restore command with the `--restore-schema` flag.\n"
usage: sctool restore 1-1-restore --cluster <id|name> --location [<dc>:]<provider>:<bucket> --snapshot-tag <tag> [flags] --source-cluster-id <id> --nodes-mapping <filepath>
options:
- name: cluster
shorthand: c
usage: |
The target cluster `name or ID` (envvar SCYLLA_MANAGER_CLUSTER).
- name: cron
usage: |
Task schedule as a cron `expression`.
It supports the extended syntax including @monthly, @weekly, @daily, @midnight, @hourly, @every X[h|m|s].
- name: dry-run
default_value: "false"
usage: |
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.
- name: enabled
default_value: "true"
usage: |
Not enabled tasks are not executed and are hidden from the task list.
- name: help
shorthand: h
default_value: "false"
usage: help for 1-1-restore
- name: interval
shorthand: i
usage: |
--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.
- name: keyspace
shorthand: K
default_value: '[]'
usage: |+
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*.
- name: label
usage: |
A comma-separated list of label modifications. Labels are represented as a key-value store.
Character '=' has a special meaning and cannot be a part of label's key nor value.
A single modification takes form of:
* '<key>=<value>' - sets the label <key> to <value>
* '<key>-' - removes the label
For example, '--label k1=v1,k2-' will set the label 'k1' to 'v1' and will also remove label 'k2'.
- name: location
shorthand: L
default_value: '[]'
usage: |
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 will be ignored and nodes-mapping will be used instead.
- name: name
usage: |
Task name that can be used instead of ID.
- name: nodes-mapping
usage: |
Path to a file with source cluster and target cluster nodes mapping. Each line should contain node mapping in the following format <source_dc>:<source_rack>:<source_host_id>=<destination_dc>:<destination_rack>:<destination_host_id>
- name: num-retries
shorthand: r
default_value: "3"
usage: |
Number of times a task reruns following a failure.
- name: retry-wait
default_value: 10m
usage: |
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.
- name: snapshot-tag
shorthand: T
usage: |
Scylla Manager snapshot tag identifying restored backup.
Snapshot tags can be obtained from backup listing ('./sctool backup list' command - e.g. sm_20060102150405UTC).
- name: source-cluster-id
usage: |
Cluster ID of the backup cluster.
- name: start-date
shorthand: s
usage: |
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.
- name: timezone
default_value: UTC
usage: |
Timezone of --cron and --window flag values.
The default value is taken from this system, namely 'TZ' envvar or '/etc/localtime' file.
- name: window
default_value: '[]'
usage: |
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
inherited_options:
- name: api-cert-file
usage: |
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).
- name: api-key-file
usage: |
File `path` to HTTPS client key associated with --api-cert-file flag (envvar SCYLLA_MANAGER_API_KEY_FILE).
- name: api-url
default_value: http://127.0.0.1:5080/api/v1
usage: |
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.
see_also:
- sctool restore - Run an ad-hoc restore of schema or tables
- sctool restore 1-1-restore update - Modify properties of the existing 1-1-restore task