-
Notifications
You must be signed in to change notification settings - Fork 4k
/
Copy pathndb_restore.1
3924 lines (3924 loc) · 73.4 KB
/
ndb_restore.1
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
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
'\" t
.\" Title: ndb_restore
.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
.\" Date: 10/11/2024
.\" Manual: MySQL Database System
.\" Source: MySQL 9.0
.\" Language: English
.\"
.TH "NDB_RESTORE" "1" "10/11/2024" "MySQL 9\&.0" "MySQL Database System"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
ndb_restore \- restore an NDB Cluster backup
.SH "SYNOPSIS"
.HP \w'\fBndb_restore\ \fR\fB\fIoptions\fR\fR\ 'u
\fBndb_restore \fR\fB\fIoptions\fR\fR
.SH "DESCRIPTION"
.PP
The NDB Cluster restoration program is implemented as a separate command\-line utility
\fBndb_restore\fR, which can normally be found in the MySQL
bin
directory\&. This program reads the files created as a result of the backup and inserts the stored information into the database\&.
.PP
\fBndb_restore\fR
must be executed once for each of the backup files that were created by the
START BACKUP
command used to create the backup (see
Section\ \&25.6.8.2, \(lqUsing The NDB Cluster Management Client to Create a Backup\(rq)\&. This is equal to the number of data nodes in the cluster at the time that the backup was created\&.
.if n \{\
.sp
.\}
.RS 4
.it 1 an-trap
.nr an-no-space-flag 1
.nr an-break-flag 1
.br
.ps +1
\fBNote\fR
.ps -1
.br
.PP
Before using
\fBndb_restore\fR, it is recommended that the cluster be running in single user mode, unless you are restoring multiple data nodes in parallel\&. See
Section\ \&25.6.6, \(lqNDB Cluster Single User Mode\(rq, for more information\&.
.sp .5v
.RE
.PP
Options that can be used with
\fBndb_restore\fR
are shown in the following table\&. Additional descriptions follow the table\&.
.PP
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fB\-\-allow\-pk\-changes\fR
.TS
allbox tab(:);
lB l
lB l
lB l
lB l
lB l.
T{
Command-Line Format
T}:T{
--allow-pk-changes[=0|1]
T}
T{
Type
T}:T{
Integer
T}
T{
Default Value
T}:T{
0
T}
T{
Minimum Value
T}:T{
0
T}
T{
Maximum Value
T}:T{
1
T}
.TE
.sp 1
When this option is set to
1,
\fBndb_restore\fR
allows the primary keys in a table definition to differ from that of the same table in the backup\&. This may be desirable when backing up and restoring between different schema versions with primary key changes on one or more tables, and it appears that performing the restore operation using ndb_restore is simpler or more efficient than issuing many
ALTER TABLE
statements after restoring table schemas and data\&.
.sp
The following changes in primary key definitions are supported by
\fB\-\-allow\-pk\-changes\fR:
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fBExtending the primary key\fR: A non\-nullable column that exists in the table schema in the backup becomes part of the table\*(Aqs primary key in the database\&.
.if n \{\
.sp
.\}
.RS 4
.it 1 an-trap
.nr an-no-space-flag 1
.nr an-break-flag 1
.br
.ps +1
\fBImportant\fR
.ps -1
.br
When extending a table\*(Aqs primary key, any columns which become part of primary key must not be updated while the backup is being taken; any such updates discovered by
\fBndb_restore\fR
cause the restore operation to fail, even when no change in value takes place\&. In some cases, it may be possible to override this behavior using the
\fB\-\-ignore\-extended\-pk\-updates\fR
option; see the description of this option for more information\&.
.sp .5v
.RE
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fBContracting the primary key (1)\fR: A column that is already part of the table\*(Aqs primary key in the backup schema is no longer part of the primary key, but remains in the table\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fBContracting the primary key (2)\fR: A column that is already part of the table\*(Aqs primary key in the backup schema is removed from the table entirely\&.
.RE
.sp
These differences can be combined with other schema differences supported by
\fBndb_restore\fR, including changes to blob and text columns requiring the use of staging tables\&.
.sp
Basic steps in a typical scenario using primary key schema changes are listed here:
.sp
.RS 4
.ie n \{\
\h'-04' 1.\h'+01'\c
.\}
.el \{\
.sp -1
.IP " 1." 4.2
.\}
Restore table schemas using
\fBndb_restore\fR
\fB\-\-restore\-meta\fR
.RE
.sp
.RS 4
.ie n \{\
\h'-04' 2.\h'+01'\c
.\}
.el \{\
.sp -1
.IP " 2." 4.2
.\}
Alter schema to that desired, or create it
.RE
.sp
.RS 4
.ie n \{\
\h'-04' 3.\h'+01'\c
.\}
.el \{\
.sp -1
.IP " 3." 4.2
.\}
Back up the desired schema
.RE
.sp
.RS 4
.ie n \{\
\h'-04' 4.\h'+01'\c
.\}
.el \{\
.sp -1
.IP " 4." 4.2
.\}
Run
\fBndb_restore\fR
\fB\-\-disable\-indexes\fR
using the backup from the previous step, to drop indexes and constraints
.RE
.sp
.RS 4
.ie n \{\
\h'-04' 5.\h'+01'\c
.\}
.el \{\
.sp -1
.IP " 5." 4.2
.\}
Run
\fBndb_restore\fR
\fB\-\-allow\-pk\-changes\fR
(possibly along with
\fB\-\-ignore\-extended\-pk\-updates\fR,
\fB\-\-disable\-indexes\fR, and possibly other options as needed) to restore all data
.RE
.sp
.RS 4
.ie n \{\
\h'-04' 6.\h'+01'\c
.\}
.el \{\
.sp -1
.IP " 6." 4.2
.\}
Run
\fBndb_restore\fR
\fB\-\-rebuild\-indexes\fR
using the backup made with the desired schema, to rebuild indexes and constraints
.RE
.sp
When extending the primary key, it may be necessary for
\fBndb_restore\fR
to use a temporary secondary unique index during the restore operation to map from the old primary key to the new one\&. Such an index is created only when necessary to apply events from the backup log to a table which has an extended primary key\&. This index is named
NDB$RESTORE_PK_MAPPING, and is created on each table requiring it; it can be shared, if necessary, by multiple instances of
\fBndb_restore\fR
instances running in parallel\&. (Running
\fBndb_restore\fR
\fB\-\-rebuild\-indexes\fR
at the end of the restore process causes this index to be dropped\&.)
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fB\-\-append\fR
.TS
allbox tab(:);
lB l.
T{
Command-Line Format
T}:T{
--append
T}
.TE
.sp 1
When used with the
\fB\-\-tab\fR
and
\fB\-\-print\-data\fR
options, this causes the data to be appended to any existing files having the same names\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fB\-\-backup\-path\fR=\fIdir_name\fR
.TS
allbox tab(:);
lB l
lB l
lB l.
T{
Command-Line Format
T}:T{
--backup-path=path
T}
T{
Type
T}:T{
Directory name
T}
T{
Default Value
T}:T{
./
T}
.TE
.sp 1
The path to the backup directory is required; this is supplied to
\fBndb_restore\fR
using the
\fB\-\-backup\-path\fR
option, and must include the subdirectory corresponding to the ID backup of the backup to be restored\&. For example, if the data node\*(Aqs
DataDir
is
/var/lib/mysql\-cluster, then the backup directory is
/var/lib/mysql\-cluster/BACKUP, and the backup files for the backup with the ID 3 can be found in
/var/lib/mysql\-cluster/BACKUP/BACKUP\-3\&. The path may be absolute or relative to the directory in which the
\fBndb_restore\fR
executable is located, and may be optionally prefixed with
\fBbackup\-path=\fR\&.
.sp
It is possible to restore a backup to a database with a different configuration than it was created from\&. For example, suppose that a backup with backup ID
12, created in a cluster with two storage nodes having the node IDs
2
and
3, is to be restored to a cluster with four nodes\&. Then
\fBndb_restore\fR
must be run twice\(emonce for each storage node in the cluster where the backup was taken\&. However,
\fBndb_restore\fR
cannot always restore backups made from a cluster running one version of MySQL to a cluster running a different MySQL version\&. See
Section\ \&25.3.7, \(lqUpgrading and Downgrading NDB Cluster\(rq, for more information\&.
.if n \{\
.sp
.\}
.RS 4
.it 1 an-trap
.nr an-no-space-flag 1
.nr an-break-flag 1
.br
.ps +1
\fBImportant\fR
.ps -1
.br
It is not possible to restore a backup made from a newer version of NDB Cluster using an older version of
\fBndb_restore\fR\&. You can restore a backup made from a newer version of MySQL to an older cluster, but you must use a copy of
\fBndb_restore\fR
from the newer NDB Cluster version to do so\&.
.sp
For example, to restore a cluster backup taken from a cluster running NDB Cluster 8\&.4\&.0 to a cluster running NDB Cluster 8\&.0\&.38, you must use the
\fBndb_restore\fR
that comes with the NDB Cluster 8\&.0\&.38 distribution\&.
.sp .5v
.RE
For more rapid restoration, the data may be restored in parallel, provided that there is a sufficient number of cluster connections available\&. That is, when restoring to multiple nodes in parallel, you must have an
[api]
or
[mysqld]
section in the cluster
config\&.ini
file available for each concurrent
\fBndb_restore\fR
process\&. However, the data files must always be applied before the logs\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fB\-\-backup\-password=\fR\fB\fIpassword\fR\fR
.TS
allbox tab(:);
lB l
lB l
lB l.
T{
Command-Line Format
T}:T{
--backup-password=password
T}
T{
Type
T}:T{
String
T}
T{
Default Value
T}:T{
[none]
T}
.TE
.sp 1
This option specifies a password to be used when decrypting an encrypted backup with the
\fB\-\-decrypt\fR
option\&. This must be the same password that was used to encrypt the backup\&.
.sp
The password must be 1 to 256 characters in length, and must be enclosed by single or double quotation marks\&. It can contain any of the ASCII characters having character codes 32, 35, 38, 40\-91, 93, 95, and 97\-126; in other words, it can use any printable ASCII characters except for
!,
\*(Aq,
",
$,
%,
\e, and
^\&.
.sp
It is possible to omit the password, in which case
\fBndb_restore\fR
waits for it to be supplied from
stdin, as when using
\fB\-\-backup\-password\-from\-stdin\fR\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fB\-\-backup\-password\-from\-stdin[=TRUE|FALSE]\fR
.TS
allbox tab(:);
lB l.
T{
Command-Line Format
T}:T{
--backup-password-from-stdin
T}
.TE
.sp 1
When used in place of
\fB\-\-backup\-password\fR, this option enables input of the backup password from the system shell (stdin), similar to how this is done when supplying the password interactively to
\fBmysql\fR
when using the
\fB\-\-password\fR
without supplying the password on the command line\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fB\-\-backupid\fR=\fI#\fR,
\fB\-b\fR
.TS
allbox tab(:);
lB l
lB l
lB l.
T{
Command-Line Format
T}:T{
--backupid=#
T}
T{
Type
T}:T{
Numeric
T}
T{
Default Value
T}:T{
none
T}
.TE
.sp 1
This option is required; it is used to specify the ID or sequence number of the backup, and is the same number shown by the management client in the
Backup \fIbackup_id\fR completed
message displayed upon completion of a backup\&. (See
Section\ \&25.6.8.2, \(lqUsing The NDB Cluster Management Client to Create a Backup\(rq\&.)
.if n \{\
.sp
.\}
.RS 4
.it 1 an-trap
.nr an-no-space-flag 1
.nr an-break-flag 1
.br
.ps +1
\fBImportant\fR
.ps -1
.br
When restoring cluster backups, you must be sure to restore all data nodes from backups having the same backup ID\&. Using files from different backups results at best in restoring the cluster to an inconsistent state, and is likely to fail altogether\&.
.sp .5v
.RE
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fB\-\-character\-sets\-dir\fR
.TS
allbox tab(:);
lB l.
T{
Command-Line Format
T}:T{
--character-sets-dir=path
T}
.TE
.sp 1
Directory containing character sets\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fB\-\-connect\fR,
\fB\-c\fR
.TS
allbox tab(:);
lB l
lB l
lB l.
T{
Command-Line Format
T}:T{
--connect=connection_string
T}
T{
Type
T}:T{
String
T}
T{
Default Value
T}:T{
localhost:1186
T}
.TE
.sp 1
Alias for
\fB\-\-ndb\-connectstring\fR\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fB\-\-connect\-retries\fR
.TS
allbox tab(:);
lB l
lB l
lB l
lB l
lB l.
T{
Command-Line Format
T}:T{
--connect-retries=#
T}
T{
Type
T}:T{
Integer
T}
T{
Default Value
T}:T{
12
T}
T{
Minimum Value
T}:T{
0
T}
T{
Maximum Value
T}:T{
12
T}
.TE
.sp 1
Number of times to retry connection before giving up\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fB\-\-connect\-retry\-delay\fR
.TS
allbox tab(:);
lB l
lB l
lB l
lB l
lB l.
T{
Command-Line Format
T}:T{
--connect-retry-delay=#
T}
T{
Type
T}:T{
Integer
T}
T{
Default Value
T}:T{
5
T}
T{
Minimum Value
T}:T{
0
T}
T{
Maximum Value
T}:T{
5
T}
.TE
.sp 1
Number of seconds to wait between attempts to contact management server\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fB\-\-connect\-string\fR
.TS
allbox tab(:);
lB l
lB l
lB l.
T{
Command-Line Format
T}:T{
--connect-string=connection_string
T}
T{
Type
T}:T{
String
T}
T{
Default Value
T}:T{
[none]
T}
.TE
.sp 1
Same as
\fB\-\-ndb\-connectstring\fR\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fB\-\-core\-file\fR
.TS
allbox tab(:);
lB l.
T{
Command-Line Format
T}:T{
--core-file
T}
.TE
.sp 1
Write core file on error; used in debugging\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fB\-\-decrypt\fR
.TS
allbox tab(:);
lB l.
T{
Command-Line Format
T}:T{
--decrypt
T}
.TE
.sp 1
Decrypt an encrypted backup using the password supplied by the
\fB\-\-backup\-password\fR
option\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fB\-\-defaults\-extra\-file\fR
.TS
allbox tab(:);
lB l
lB l
lB l.
T{
Command-Line Format
T}:T{
--defaults-extra-file=path
T}
T{
Type
T}:T{
String
T}
T{
Default Value
T}:T{
[none]
T}
.TE
.sp 1
Read given file after global files are read\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fB\-\-defaults\-file\fR
.TS
allbox tab(:);
lB l
lB l
lB l.
T{
Command-Line Format
T}:T{
--defaults-file=path
T}
T{
Type
T}:T{
String
T}
T{
Default Value
T}:T{
[none]
T}
.TE
.sp 1
Read default options from given file only\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fB\-\-defaults\-group\-suffix\fR
.TS
allbox tab(:);
lB l
lB l
lB l.
T{
Command-Line Format
T}:T{
--defaults-group-suffix=string
T}
T{
Type
T}:T{
String
T}
T{
Default Value
T}:T{
[none]
T}
.TE
.sp 1
Also read groups with concat(group, suffix)\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fB\-\-disable\-indexes\fR
.TS
allbox tab(:);
lB l.
T{
Command-Line Format
T}:T{
--disable-indexes
T}
.TE
.sp 1
Disable restoration of indexes during restoration of the data from a native
NDB
backup\&. Afterwards, you can restore indexes for all tables at once with multithreaded building of indexes using
\fB\-\-rebuild\-indexes\fR, which should be faster than rebuilding indexes concurrently for very large tables\&.
.sp
This option also drops any foreign keys specified in the backup\&.
.sp
MySQL can open an
NDB
table for which one or more indexes cannot be found, provided the query does not use any of the affected indexes; otherwise the query is rejected with
ER_NOT_KEYFILE\&. In the latter case, you can temporarily work around the problem by executing an
ALTER TABLE
statement such as this one:
.sp
.if n \{\
.RS 4
.\}
.nf
ALTER TABLE tbl ALTER INDEX idx INVISIBLE;
.fi
.if n \{\
.RE
.\}
.sp
This causes MySQL to ignore the index
idx
on table
tbl\&. See
Primary Keys and Indexes, for more information, as well as
Section\ \&10.3.12, \(lqInvisible Indexes\(rq\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fB\-\-dont\-ignore\-systab\-0\fR,
\fB\-f\fR
.TS
allbox tab(:);
lB l.
T{
Command-Line Format
T}:T{
--dont-ignore-systab-0
T}
.TE
.sp 1
Normally, when restoring table data and metadata,
\fBndb_restore\fR
ignores the copy of the
NDB
system table that is present in the backup\&.
\fB\-\-dont\-ignore\-systab\-0\fR
causes the system table to be restored\&.
\fIThis option is intended for experimental and development use only, and is not recommended in a production environment\fR\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fB\-\-exclude\-databases\fR=\fIdb\-list\fR
.TS
allbox tab(:);
lB l
lB l
lB l.
T{
Command-Line Format
T}:T{
--exclude-databases=list
T}
T{
Type
T}:T{
String
T}
T{
Default Value
T}:T{
T}
.TE
.sp 1
Comma\-delimited list of one or more databases which should not be restored\&.
.sp
This option is often used in combination with
\fB\-\-exclude\-tables\fR; see that option\*(Aqs description for further information and examples\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fB\-\-exclude\-intermediate\-sql\-tables[\fR=\fITRUE|FALSE]\fR
.TS
allbox tab(:);
lB l
lB l
lB l.
T{
Command-Line Format
T}:T{
--exclude-intermediate-sql-tables[=TRUE|FALSE]
T}
T{
Type
T}:T{
Boolean
T}
T{
Default Value
T}:T{
TRUE
T}
.TE
.sp 1
When performing copying
ALTER TABLE
operations,
\fBmysqld\fR