You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(restore): adds --dc-mapping flag to restore command (#4213)
This adds support for `--dc-mapping` flag to restore command. It specifies mapping between DCs from the backup and DCs in the restored(target) cluster. Only 1 use case is supported: 1-1 dc mapping. This means that squeezing (restore dc1 and dc2 into dc3) or extending (restore dc1 into dc1 and dc2) DCs is not supported when --dc-mapping is provided.
So the syntax is:
source_dc1=target_dc1,source_dc2=target_dc2
Where
equal(=) is used to separate source dc name and target dc name
comma(,) is used to separate multiple mappings
If --dc-mapping is not provided, then current behavior should be preserved - each node with access to DC can download it data. Also it's allowed to provide only subset of DCs, ignoring source dc or target (or both).
Only works with tables restoration (--restore-tables=true).
Fixes: #3829
Copy file name to clipboardExpand all lines: docs/source/sctool/partials/sctool_restore.yaml
+4Lines changed: 4 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -26,6 +26,9 @@ options:
26
26
usage: |
27
27
Task schedule as a cron `expression`.
28
28
It supports the extended syntax including @monthly, @weekly, @daily, @midnight, @hourly, @every X[h|m|s].
29
+
- name: dc-mapping
30
+
default_value: '[]'
31
+
usage: "Specifies mapping between DCs from the backup and DCs in the restored(target) cluster.\n\nThe Syntax is \"source_dc1=target_dc1,source_dc2=target_dc2\" where multiple mappings are separated by comma (,)\nand source and target DCs are separated by equal (=).\n\nExample: \"dc1=dc3,dc2=dc4\" - data from dc1 should be restored to dc3 and data from dc2 should be restored to dc4.\n\nOnly works with tables restoration (--restore-tables=true). \nNote: Only DCs that are provided in mappings will be restored.\n"
29
32
- name: dry-run
30
33
default_value: "false"
31
34
usage: |
@@ -90,6 +93,7 @@ options:
90
93
The `<dc>` parameter is optional. It allows you to specify the datacenter whose nodes will be used to restore the data
91
94
from this location in a multi-dc setting, it must match Scylla nodes datacenter.
92
95
By default, all live nodes are used to restore data from specified locations.
96
+
If `--dc-mapping` is used, then `<dc>` parameter will be ignored.
93
97
94
98
Note that specifying datacenters closest to backup locations might reduce download time of restored data.
95
99
The supported storage '<provider>'s are 'azure', 'gcs', 's3'.
Copy file name to clipboardExpand all lines: docs/source/sctool/partials/sctool_restore_update.yaml
+4Lines changed: 4 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -24,6 +24,9 @@ options:
24
24
usage: |
25
25
Task schedule as a cron `expression`.
26
26
It supports the extended syntax including @monthly, @weekly, @daily, @midnight, @hourly, @every X[h|m|s].
27
+
- name: dc-mapping
28
+
default_value: '[]'
29
+
usage: "Specifies mapping between DCs from the backup and DCs in the restored(target) cluster.\n\nThe Syntax is \"source_dc1=target_dc1,source_dc2=target_dc2\" where multiple mappings are separated by comma (,)\nand source and target DCs are separated by equal (=).\n\nExample: \"dc1=dc3,dc2=dc4\" - data from dc1 should be restored to dc3 and data from dc2 should be restored to dc4.\n\nOnly works with tables restoration (--restore-tables=true). \nNote: Only DCs that are provided in mappings will be restored.\n"
27
30
- name: dry-run
28
31
default_value: "false"
29
32
usage: |
@@ -88,6 +91,7 @@ options:
88
91
The `<dc>` parameter is optional. It allows you to specify the datacenter whose nodes will be used to restore the data
89
92
from this location in a multi-dc setting, it must match Scylla nodes datacenter.
90
93
By default, all live nodes are used to restore data from specified locations.
94
+
If `--dc-mapping` is used, then `<dc>` parameter will be ignored.
91
95
92
96
Note that specifying datacenters closest to backup locations might reduce download time of restored data.
93
97
The supported storage '<provider>'s are 'azure', 'gcs', 's3'.
0 commit comments