File: ndb_restore.1

package info (click to toggle)
mysql-5.1 5.1.73-1%2Bdeb6u1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze-lts
  • size: 197,132 kB
  • ctags: 93,377
  • sloc: cpp: 579,952; ansic: 429,462; perl: 49,053; sh: 21,692; pascal: 21,272; yacc: 12,801; makefile: 4,545; xml: 4,114; sql: 3,297; lex: 1,265; asm: 1,023
file content (2323 lines) | stat: -rw-r--r-- 50,809 bytes parent folder | download | duplicates (2)
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
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
'\" t
.\"     Title: \fBndb_restore\fR
.\"    Author: [FIXME: author] [see http://docbook.sf.net/el/author]
.\" Generator: DocBook XSL Stylesheets v1.77.1 <http://docbook.sf.net/>
.\"      Date: 11/04/2013
.\"    Manual: MySQL Database System
.\"    Source: MySQL 5.1
.\"  Language: English
.\"
.TH "\FBNDB_RESTORE\FR" "1" "11/04/2013" "MySQL 5\&.1" "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 *
.\" -----------------------------------------------------------------
.\" MySQL Cluster: backups
.\" backups: in MySQL Cluster
.\" MySQL Cluster: restoring backups
.\" restoring backups: in MySQL Cluster
.\" ndb_restore
.SH "NAME"
ndb_restore \- restore a MySQL 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 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\ \&17.5.3.2, \(lqUsing The MySQL 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\&.
.\" single user mode (MySQL Cluster): and ndb_restore
.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\ \&17.5.8, \(lqMySQL Cluster Single User Mode\(rq, for more information\&.
.sp .5v
.RE
.PP
The following table includes options that are specific to the MySQL Cluster native backup restoration program
\fBndb_restore\fR\&. Additional descriptions follow the table\&. For options common to most MySQL Cluster programs (including
\fBndb_restore\fR), see
Options Common to MySQL Cluster Programs(1)\&.
.sp
.it 1 an-trap
.nr an-no-space-flag 1
.nr an-break-flag 1
.br
.B Table\ \&17.23.\ \&ndb_restore Options and Variables: MySQL 5.1, MySQL Cluster NDB 6.3-7.1
.TS
allbox tab(:);
lB lB lB.
T{
Format
T}:T{
Description
T}:T{
Added / Removed
T}
.T&
l l l
l l l
l l l
l l l
l l l
l l l
l l l
l l l
l l l
l l l
l l l
l l l
l l l
l l l
l l l
l l l
l l l
l l l
l l l
l l l
l l l
l l l
l l l
l l l
l l l
l l l
l l l
l l l
l l l
l l l
l l l
l l l
l l l
l l l
l l l
l l l
l l l
l l l
l l l
l l l
l l l.
T{
.PP
--connect,
.PP
-c
T}:T{
Alias for \-\-connectstring\&.
T}:T{
.PP
All MySQL 5\&.1 based releases
T}
T{
.PP
--nodeid=#,
.PP
-n
T}:T{
Back up files from node with this ID
T}:T{
.PP
All MySQL 5\&.1 based releases
T}
T{
.PP
--backupid=#,
.PP
-b
T}:T{
Restore from the backup with the given ID
T}:T{
.PP
All MySQL 5\&.1 based releases
T}
T{
.PP
--restore_data,
.PP
-r
T}:T{
Restore table data and logs into NDB Cluster using the NDB API
T}:T{
.PP
All MySQL 5\&.1 based releases
T}
T{
.PP
--restore_meta,
.PP
-m
T}:T{
Restore metadata to NDB Cluster using the NDB API
T}:T{
.PP
All MySQL 5\&.1 based releases
T}
T{
.PP
--no-upgrade,
.PP
-u
T}:T{
Do not upgrade array type for varsize attributes which do not already
            resize VAR data, and do not change column attributes
T}:T{
.PP
ADDED: 5\&.1\&.19
T}
T{
.PP
--promote-attributes,
.PP
-A
T}:T{
Allow attributes to be promoted when restoring data from backup
T}:T{
.PP
ADDED: NDB 6\&.3\&.8
T}
T{
.PP
--preserve-trailing-spaces,
.PP
-P
T}:T{
Allow preservation of trailing spaces (including padding) when promoting
            fixed\-width string types to variable\-width types
T}:T{
.PP
ADDED: NDB 6\&.3\&.8
T}
T{
.PP
--no-restore-disk-objects,
.PP
-d
T}:T{
Do not restore objects relating to Disk Data
T}:T{
.PP
ADDED: 5\&.1\&.6
T}
T{
.PP
--restore_epoch,
.PP
-e
T}:T{
Restore epoch info into the status table\&. Convenient on a MySQL Cluster
            replication slave for starting replication\&. The row in
            mysql\&.ndb_apply_status with id 0 will be updated/inserted\&.
T}:T{
.PP
All MySQL 5\&.1 based releases
T}
T{
.PP
--skip-table-check,
.PP
-s
T}:T{
Skip table structure check during restoring of data
T}:T{
.PP
ADDED: 5\&.1\&.17
T}
T{
.PP
--parallelism=#,
.PP
-p
T}:T{
Number of parallel transactions to use while restoring data
T}:T{
.PP
All MySQL 5\&.1 based releases
T}
T{
.PP
--print
T}:T{
Print metadata, data and log to stdout (equivalent to \-\-print_meta
            \-\-print_data \-\-print_log)
T}:T{
.PP
All MySQL 5\&.1 based releases
T}
T{
.PP
--print_meta
T}:T{
Print metadata to stdout
T}:T{
.PP
All MySQL 5\&.1 based releases
T}
T{
.PP
--print_data
T}:T{
Print data to stdout
T}:T{
.PP
All MySQL 5\&.1 based releases
T}
T{
.PP
--print_log
T}:T{
Print to stdout
T}:T{
.PP
All MySQL 5\&.1 based releases
T}
T{
.PP
--backup_path=path
T}:T{
Path to backup files directory
T}:T{
.PP
ADDED: 5\&.1\&.17, NDB 6\&.1\&.5
T}
T{
.PP
--dont_ignore_systab_0,
.PP
-f
T}:T{
Do not ignore system table during restore\&. Experimental only; not for
            production use
T}:T{
.PP
All MySQL 5\&.1 based releases
T}
T{
.PP
--ndb-nodegroup-map=map,
.PP
-z
T}:T{
Nodegroup map for NDBCLUSTER storage engine\&. Syntax: list of
            (source_nodegroup, destination_nodegroup)
T}:T{
.PP
All MySQL 5\&.1 based releases
T}
T{
.PP
--fields-enclosed-by=char
T}:T{
Fields are enclosed with the indicated character
T}:T{
.PP
ADDED: 5\&.1\&.18
T}
T{
.PP
--fields-terminated-by=char
T}:T{
Fields are terminated by the indicated character
T}:T{
.PP
ADDED: 5\&.1\&.18
T}
T{
.PP
--fields-optionally-enclosed-by
T}:T{
Fields are optionally enclosed with the indicated character
T}:T{
.PP
ADDED: 5\&.1\&.18
T}
T{
.PP
--lines-terminated-by=char
T}:T{
Lines are terminated by the indicated character
T}:T{
.PP
ADDED: 5\&.1\&.18
T}
T{
.PP
--hex
T}:T{
Print binary types in hexadecimal format
T}:T{
.PP
ADDED: 5\&.1\&.18
T}
T{
.PP
--tab=path,
.PP
-T
T}:T{
Creates a tab\-separated \&.txt file for each table in the given path
T}:T{
.PP
ADDED: 5\&.1\&.18
T}
T{
.PP
--append
T}:T{
Append data to a tab\-delimited file
T}:T{
.PP
ADDED: 5\&.1\&.18
T}
T{
.PP
--progress-frequency=#
T}:T{
Print status of restoration each given number of seconds
T}:T{
.PP
All MySQL 5\&.1 based releases
T}
T{
.PP
--no-binlog
T}:T{
If a mysqld is connected and using binary logging, do not log the
            restored data
T}:T{
.PP
ADDED: NDB 6\&.2\&.16, NDB 6\&.3\&.16
T}
T{
.PP
--verbose=#
T}:T{
Level of verbosity in output
T}:T{
.PP
All MySQL 5\&.1 based releases
T}
T{
.PP
--include-databases=db-list
T}:T{
List of one or more databases to restore (excludes those not named)
T}:T{
.PP
ADDED: NDB 6\&.3\&.22, NDB 6\&.4\&.3
T}
T{
.PP
--exclude-databases=db-list
T}:T{
List of one or more databases to exclude (includes those not named)
T}:T{
.PP
ADDED: NDB 6\&.3\&.22, NDB 6\&.4\&.3
T}
T{
.PP
--include-tables=table-list
T}:T{
List of one or more tables to restore (excludes those in same database
            that are not named); each table reference must include the
            database name
T}:T{
.PP
ADDED: NDB 6\&.3\&.22, NDB 6\&.4\&.3
T}
T{
.PP
--exclude-tables=table-list
T}:T{
List of one or more tables to exclude (includes those in same database
            that are not not named); each table reference must include
            the database name
T}:T{
.PP
ADDED: NDB 6\&.3\&.22, NDB 6\&.4\&.3
T}
T{
.PP
--exclude-missing-columns
T}:T{
Causes columns from the backup version of a table that are missing from
            the version of the table in the database to be ignored\&.
T}:T{
.PP
ADDED: NDB 6\&.3\&.26, NDB 7\&.0\&.7
T}
T{
.PP
--disable-indexes
T}:T{
Causes indexes from a backup to be ignored; may decrease time needed to
            restore data\&.
T}:T{
.PP
ADDED: NDB 6\&.3\&.31, NDB 7\&.0\&.11, NDB 7\&.1\&.2
T}
T{
.PP
--rebuild-indexes
T}:T{
Causes multi\-threaded ordered index rebuilding of indexes found in the
            backup\&.
T}:T{
.PP
ADDED: NDB 6\&.3\&.31, NDB 7\&.0\&.11, NDB 7\&.1\&.2
T}
T{
.PP
--skip-broken-objects
T}:T{
Causes missing blob tables in the backup file to be ignored\&.
T}:T{
.PP
ADDED: NDB 6\&.3\&.40, NDB 7\&.0\&.21, NDB 7\&.1\&.10
T}
T{
.PP
--skip-unknown-objects
T}:T{
Causes schema objects not recognized by ndb_restore to be ignored when
            restoring a backup made from a newer MySQL Cluster version
            to an older version\&.
T}:T{
.PP
ADDED: NDB 6\&.3\&.34, NDB 7\&.0\&.15, NDB 7\&.1\&.4
T}
T{
.PP
--rewrite-database=olddb,newdb
T}:T{
Restores to a database with a different name than the original
T}:T{
.PP
ADDED: NDB 6\&.3\&.41, NDB 7\&.0\&.22, NDB 7\&.1\&.11
T}
T{
.PP
--lossy-conversions,
.PP
-L
T}:T{
Allow lossy conversions of column values (type demotions or changes in
            sign) when restoring data from backup
T}:T{
.PP
ADDED: NDB 7\&.1\&.11
T}
T{
.PP
--restore-privilege-tables
T}:T{
Restore MySQL privilege tables that were previously moved to NDB\&.
T}:T{
.PP
ADDED: NDB 7\&.2\&.0
T}
.TE
.sp 1
.PP
Typical options for this utility are shown here:
.sp
.if n \{\
.RS 4
.\}
.nf
ndb_restore [\-c \fIconnection_string\fR] \-n \fInode_id\fR \-b \fIbackup_id\fR \e
      [\-m] \-r \-\-backup_path=\fI/path/to/backup/files\fR
.fi
.if n \{\
.RE
.\}
.PP
.\" restore_connect option (ndb_restore)
The
\fB\-c\fR
option is used to specify a connection string which tells
ndb_restore
where to locate the cluster management server\&. (See
Section\ \&17.3.2.3, \(lqMySQL Cluster Connection Strings\(rq, for information on connection strings\&.) If this option is not used, then
\fBndb_restore\fR
attempts to connect to a management server on
localhost:1186\&. This utility acts as a cluster API node, and so requires a free connection
\(lqslot\(rq
to connect to the cluster management server\&. This means that there must be at least one
[api]
or
[mysqld]
section that can be used by it in the cluster
config\&.ini
file\&. It is a good idea to keep at least one empty
[api]
or
[mysqld]
section in
config\&.ini
that is not being used for a MySQL server or other application for this reason (see
Section\ \&17.3.2.7, \(lqDefining SQL and Other API Nodes in a MySQL Cluster\(rq)\&.
.PP
You can verify that
\fBndb_restore\fR
is connected to the cluster by using the
\fBSHOW\fR
command in the
\fBndb_mgm\fR
management client\&. You can also accomplish this from a system shell, as shown here:
.sp
.if n \{\
.RS 4
.\}
.nf
shell> \fBndb_mgm \-e "SHOW"\fR
.fi
.if n \{\
.RE
.\}
.PP
.\" restore_nodeid option (ndb_restore)
\fB\-n\fR
is used to specify the node ID of the data node on which the backups were taken\&.
.PP
The first time you run the
\fBndb_restore\fR
restoration program, you also need to restore the metadata\&. In other words, you must re\-create the database tables\(emthis can be done by running it with the
\fB\-\-restore_meta\fR
(\fB\-m\fR) option\&. Restoring the metdata need be done only on a single data node; this is sufficient to restore it to the entire cluster\&. Note that the cluster should have an empty database when starting to restore a backup\&. (In other words, you should start
\fBndbd\fR
with
\fB\-\-initial\fR
prior to performing the restore\&.)
.PP
.\" restore_skip-table-check option (ndb_restore)
It is possible to restore data without restoring table metadata\&. Prior to MySQL 5\&.1\&.17,
\fBndb_restore\fR
did not perform any checks of table schemas; if a table was altered between the time the backup was taken and when
\fBndb_restore\fR
was run,
\fBndb_restore\fR
would still attempt to restore the data to the altered table\&.
.PP
Beginning with MySQL 5\&.1\&.17, the default behavior is for
\fBndb_restore\fR
to fail with an error if table data do not match the table schema; this can be overridden using the
\fB\-\-skip\-table\-check\fR
or
\fB\-s\fR
option\&. Prior to MySQL 5\&.1\&.21, if this option is used, then
\fBndb_restore\fR
attempts to fit data into the existing table schema, but the result of restoring a backup to a table schema that does not match the original is unspecified\&.
.PP
Beginning with MySQL Cluster NDB 6\&.3\&.35, MySQL Cluster NDB 7\&.0\&.16, and MySQL Cluster NDB 7\&.1\&.5, some of the restrictions on mismatches in column definitions when restoring data using
\fBndb_restore\fR
are relaxed; when one of these types of mismatches is encountered,
\fBndb_restore\fR
does not stop with an error as it did previously, but rather accepts the data and inserts it into the target table while issuing a warning to the user that this is being done\&. This behavior occurs whether or not either of the options
\fB\-\-skip\-table\-check\fR
or
\fB\-\-promote\-attributes\fR
is in use\&. These differences in column definitions are of the following types:
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
Different
COLUMN_FORMAT
settings (FIXED,
DYNAMIC,
DEFAULT)
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
Different
STORAGE
settings (MEMORY,
DISK)
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
Different default values
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
Different distribution key settings
.RE
.PP
.\" attribute promotion: ndb_restore
.\" ndb_restore: attribute promotion
.\" promote-attributes option (ndb_restore)
Beginning with MySQL Cluster NDB 6\&.3\&.8,
\fBndb_restore\fR
supports limited
attribute promotion
in much the same way that it is supported by MySQL replication; that is, data backed up from a column of a given type can generally be restored to a column using a
\(lqlarger, similar\(rq
type\&. For example, data from a
CHAR(20)
column can be restored to a column declared as
VARCHAR(20),
VARCHAR(30), or
CHAR(30); data from a
MEDIUMINT
column can be restored to a column of type
INT
or
BIGINT\&. See
Section\ \&16.4.1.9.2, \(lqReplication of Columns Having Different Data Types\(rq, for a table of type conversions currently supported by attribute promotion\&.
.PP
Attribute promotion by
\fBndb_restore\fR
must be enabled explicitly, as follows:
.sp
.RS 4
.ie n \{\
\h'-04' 1.\h'+01'\c
.\}
.el \{\
.sp -1
.IP "  1." 4.2
.\}
Prepare the table to which the backup is to be restored\&.
\fBndb_restore\fR
cannot be used to re\-create the table with a different definition from the original; this means that you must either create the table manually, or alter the columns which you wish to promote using
ALTER TABLE
after restoring the table metadata but before restoring the data\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04' 2.\h'+01'\c
.\}
.el \{\
.sp -1
.IP "  2." 4.2
.\}
Invoke
\fBndb_restore\fR
with the
\fB\-\-promote\-attributes\fR
option (short form
\fB\-A\fR) when restoring the table data\&. Attribute promotion does not occur if this option is not used; instead, the restore operation fails with an error\&.
.RE
.PP
.\" ndb_restore: lossy-conversions option
.\" lossy-conversions option (ndb_restore)
\fB\-\-lossy\-conversions\fR,
\fB\-L\fR
.TS
allbox tab(:);
l l s s
l l s s
l l s s
l l s s
^ l l s
^ l l s.
T{
\fBIntroduced\fR
T}:T{
5\&.1\&.51\-ndb\-7\&.1\&.11
T}
T{
\fBCommand\-Line Format\fR
T}:T{
\-\-lossy\-conversions
T}
T{
\ \&
T}:T{
\-L
T}
T{
\ \&
T}:T{
\fBPermitted Values\fR
T}
:T{
\fBType\fR
T}:T{
boolean
T}
:T{
\fBDefault\fR
T}:T{
FALSE
T}
.TE
.sp 1
.PP
This option is intended to complement the
\fB\-\-promote\-attributes\fR
option\&. Using
\fB\-\-lossy\-conversions\fR
allows lossy conversions of column values (type demotions or changes in sign) when restoring data from backup\&. With some exceptions, the rules governing demotion are the same as for MySQL replication; see
Section\ \&16.4.1.9.2, \(lqReplication of Columns Having Different Data Types\(rq, for information about specific type conversions currently supported by attribute demotion\&.
.PP
\fBndb_restore\fR
reports any truncation of data that it performs during lossy conversions once per attribute and column\&.
.PP
This option was added in MySQL Cluster NDB 7\&.1\&.11\&.
.PP
.\" preserve-trailing-spaces option (ndb_restore)
The
\fB\-\-preserve\-trailing\-spaces\fR
option is also available beginning with MySQL Cluster NDB 6\&.3\&.8\&. This option (short form
\fB\-R\fR) causes trailing spaces to be preserved when promoting a fixed\-width character data type to its variable\-width equivalent\(emthat is, when promoting a
CHAR
column value to
VARCHAR
or a
BINARY
column value to
VARBINARY\&. Otherwise, any trailing spaces are dropped from such column values when they are inserted into the new columns\&.
.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
Although you can promote
CHAR
columns to
VARCHAR
and
BINARY
columns to
VARBINARY, you cannot promote
VARCHAR
columns to
CHAR
or
VARBINARY
columns to
BINARY\&.
.sp .5v
.RE
.PP
.\" backupid option (ndb_restore)
The
\fB\-b\fR
option 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\ \&17.5.3.2, \(lqUsing The MySQL 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
.PP
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 will at best result in restoring the cluster to an inconsistent state, and may fail altogether\&.
.sp .5v
.RE
.PP
.\" restore_epoch option (ndb_restore)
\fB\-\-restore_epoch\fR
(short form:
\fB\-e\fR) adds (or restores) epoch information to the cluster replication status table\&. This is useful for starting replication on a MySQL Cluster replication slave\&. When this option is used, the row in the
mysql\&.ndb_apply_status
having
0
in the
id
column is updated if it already exists; such a row is inserted if it does not already exist\&. (See
Section\ \&17.6.9, \(lqMySQL Cluster Backups With MySQL Cluster Replication\(rq\&.)
.PP
.\" restore_data option (ndb_restore)
\fB\-\-restore_data\fR
.PP
This option causes
\fBndb_restore\fR
to output
NDB
table data and logs\&.
.PP
.\" restore_meta option (ndb_restore)
\fB\-\-restore_meta\fR
.PP
This option causes
\fBndb_restore\fR
to print
NDB
table metadata\&. Generally, you need only use this option when restoring the first data node of a cluster; additional data nodes can obtain the metadata from the first one\&.
.PP
.\" restore-privilege-tables option (ndb_restore)
.\" ndb_restore: restore-privilege-tables option
\fB\-\-restore\-privilege\-tables\fR
.PP
\fBndb_restore\fR
does not by default restore distributed MySQL privilege tables (MySQL Cluster NDB 7\&.2\&.0 and later)\&. This option causes
\fBndb_restore\fR
to restore the privilege tables\&.
.PP
This works only if the privilege tables were converted to
NDB
before the backup was taken\&. For more information, see
Section\ \&17.5.14, \(lqDistributed MySQL Privileges for MySQL Cluster\(rq\&.
.PP
.\" backup_path option (ndb_restore)
.\" ndb_restore: backup_path option
\fB\-\-backup_path\fR
.PP
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\&.
.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
Previous to MySQL 5\&.1\&.17 and MySQL Cluster NDB 6\&.1\&.5, the path to the backup directory was specified as shown here, with
\fBbackup_path=\fR
being optional:
.sp
.if n \{\
.RS 4
.\}
.nf
[backup_path=]\fI/path/to/backup/files\fR
.fi
.if n \{\
.RE
.\}
.PP
Beginning with MySQL 5\&.1\&.17 and MySQL Cluster NDB 6\&.1\&.5, this syntax changed to
\fB\-\-backup_path=\fR\fB\fI/path/to/backup/files\fR\fR, to conform more closely with options used by other MySQL programs;
\fB\-\-backupid\fR
is required, and there is no short form for this option\&.
.sp .5v
.RE
.PP
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 database 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 database 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\ \&17.2.7, \(lqUpgrading and Downgrading MySQL 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
.PP
It is not possible to restore a backup made from a newer version of MySQL 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 MySQL Cluster version to do so\&.
.PP
For example, to restore a cluster backup taken from a cluster running MySQL Cluster NDB 7\&.1\&.8 to a cluster running MySQL Cluster NDB 7\&.0\&.16, you must use the
\fBndb_restore\fR
that comes with the MySQL Cluster NDB 7\&.1\&.8 distribution\&.
.sp .5v
.RE
.PP
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\&.
.PP
.\" no-upgrade option (ndb_restore)
.\" ndb_restore: no-upgrade option
\fB\-\-no\-upgrade\fR
.PP
Formerly, when using
\fBndb_restore\fR
to restore a backup made from a MySQL 5\&.0 cluster to a 5\&.1 cluster,
VARCHAR
columns were not resized and were recreated using the 5\&.0 fixed format\&. Beginning with MySQL 5\&.1\&.19,
ndb_restore
recreates such
VARCHAR
columns using MySQL Cluster 5\&.1\*(Aqs variable\-width format\&. Also beginning with MySQL 5\&.1\&.19, this behavior can be overridden using the
\fB\-\-no\-upgrade\fR
option (short form:
\fB\-u\fR) when running
\fBndb_restore\fR\&.
.PP
.\" print_data option (ndb_restore)
.\" ndb_restore: print_data option
\fB\-\-print_data\fR
.PP
The
\fB\-\-print_data\fR
option causes
\fBndb_restore\fR
to direct its output to
stdout\&.
.PP
TEXT
and
BLOB
column values are always truncated to the first 256 bytes in the output; this cannot currently be overridden when using
\fB\-\-print_data\fR\&.
.PP
Beginning with MySQL 5\&.1\&.18, several additional options are available for use with the
\fB\-\-print_data\fR
option in generating data dumps, either to
stdout, or to a file\&. These are similar to some of the options used with
\fBmysqldump\fR, and are shown in the following list:
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
.\" ndb_restore: tab option
.\" tab option (ndb_restore)
\fB\-\-tab\fR,
\fB\-T\fR
.TS
allbox tab(:);
l l s s
l l s s
l l s s.
T{
\fBIntroduced\fR
T}:T{
5\&.1\&.18
T}
T{
\fBCommand\-Line Format\fR
T}:T{
\-\-tab=path
T}
T{
\ \&
T}:T{
\-T
T}
.TE
.sp 1
This option causes
\fB\-\-print_data\fR
to create dump files, one per table, each named
\fItbl_name\fR\&.txt\&. It requires as its argument the path to the directory where the files should be saved; use
\&.
for the current directory\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
.\" ndb_restore: fields-enclosed-by option
.\" fields-enclosed-by option (ndb_restore)
\fB\-\-fields\-enclosed\-by=\fR\fB\fIstring\fR\fR
.TS
allbox tab(:);
l l s s
l l s s
l l s s
^ l l s
^ l l s.
T{
\fBIntroduced\fR
T}:T{
5\&.1\&.18
T}
T{
\fBCommand\-Line Format\fR
T}:T{
\-\-fields\-enclosed\-by=char
T}
T{
\ \&
T}:T{
\fBPermitted Values\fR
T}
:T{
\fBType\fR
T}:T{
string
T}
:T{
\fBDefault\fR
T}:T{
T}
.TE
.sp 1
Each column values are enclosed by the string passed to this option (regardless of data type; see next item)\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
.\" ndb_restore: fields-optionally-enclosed-by option
.\" fields-optionally-enclosed-by option (ndb_restore)
\fB\-\-fields\-optionally\-enclosed\-by=\fR\fB\fIstring\fR\fR
.TS
allbox tab(:);
l l s s
l l s s
l l s s
^ l l s
^ l l s.
T{
\fBIntroduced\fR
T}:T{
5\&.1\&.18
T}
T{
\fBCommand\-Line Format\fR
T}:T{
\-\-fields\-optionally\-enclosed\-by
T}
T{
\ \&
T}:T{
\fBPermitted Values\fR
T}
:T{
\fBType\fR
T}:T{
string
T}
:T{
\fBDefault\fR
T}:T{
T}
.TE
.sp 1
The string passed to this option is used to enclose column values containing character data (such as
CHAR,
VARCHAR,
BINARY,
TEXT, or
ENUM)\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
.\" ndb_restore: fields-terminated-by option
.\" fields-terminated-by option (ndb_restore)
\fB\-\-fields\-terminated\-by=\fR\fB\fIstring\fR\fR
.TS
allbox tab(:);
l l s s
l l s s
l l s s
^ l l s
^ l l s.
T{
\fBIntroduced\fR
T}:T{
5\&.1\&.18
T}
T{
\fBCommand\-Line Format\fR
T}:T{
\-\-fields\-terminated\-by=char
T}
T{
\ \&
T}:T{
\fBPermitted Values\fR
T}
:T{
\fBType\fR
T}:T{
string
T}
:T{
\fBDefault\fR
T}:T{
\et (tab)
T}
.TE
.sp 1
The string passed to this option is used to separate column values\&. The default value is a tab character (\et)\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
.\" ndb_restore: hex option
.\" hex option (ndb_restore)
\fB\-\-hex\fR
.TS
allbox tab(:);
l l s s
l l s s.
T{
\fBIntroduced\fR
T}:T{
5\&.1\&.18
T}
T{
\fBCommand\-Line Format\fR
T}:T{
\-\-hex
T}
.TE
.sp 1
If this option is used, all binary values are output in hexadecimal format\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
.\" ndb_restore: fields-terminated-by option
.\" fields-terminated-by option (ndb_restore)
\fB\-\-fields\-terminated\-by=\fR\fB\fIstring\fR\fR
.TS
allbox tab(:);
l l s s
l l s s
l l s s
^ l l s
^ l l s.
T{
\fBIntroduced\fR
T}:T{
5\&.1\&.18
T}
T{
\fBCommand\-Line Format\fR
T}:T{
\-\-fields\-terminated\-by=char
T}
T{
\ \&
T}:T{
\fBPermitted Values\fR
T}
:T{
\fBType\fR
T}:T{
string
T}
:T{
\fBDefault\fR
T}:T{
\et (tab)
T}
.TE
.sp 1
This option specifies the string used to end each line of output\&. The default is a linefeed character (\en)\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
.\" ndb_restore: append option
.\" append option (ndb_restore)
\fB\-\-append\fR
.TS
allbox tab(:);
l l s s
l l s s.
T{
\fBIntroduced\fR
T}:T{
5\&.1\&.18
T}
T{
\fBCommand\-Line Format\fR
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
.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
If a table has no explicit primary key, then the output generated when using the
\fB\-\-print_data\fR
option includes the table\*(Aqs hidden primary key\&.
.sp .5v
.RE
.PP
.\" ndb_restore: print_meta option
.\" print_meta option (ndb_restore)
\fB\-\-print_meta\fR
.PP
This option causes
\fBndb_restore\fR
to print all metadata to
stdout\&.
.PP
.\" ndb_restore: print_log option
.\" print_log option (ndb_restore)
\fB\-\-print_log\fR
.PP
The
\fB\-\-print_log\fR
option causes
\fBndb_restore\fR
to output its log to
stdout\&.
.PP
.\" ndb_restore: print option
.\" print option (ndb_restore)
\fB\-\-print\fR
.PP
Causes
\fBndb_restore\fR
to print all data, metadata, and logs to
stdout\&. Equivalent to using the
\fB\-\-print_data\fR,
\fB\-\-print_meta\fR, and
\fB\-\-print_log\fR
options together\&.
.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
Use of
\fB\-\-print\fR
or any of the
\fB\-\-print_*\fR
options is in effect performing a dry run\&. Including one or more of these options causes any output to be redirected to
stdout; in such cases,
\fBndb_restore\fR
makes no attempt to restore data or metadata to a MySQL Cluster\&.
.sp .5v
.RE
.PP
.\" ndb_restore: dont_ignore_systab_0 option
.\" dont_ignore_systab_0 option (ndb_restore)
\fB\-\-dont_ignore_systab_0\fR
.PP
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\&.
.PP
.\" ndb_restore: ndb-nodegroup-map option
.\" ndb-nodegroup-map option (ndb_restore)
\fB\-\-ndb\-nodegroup\-map\fR,
\fB\-z\fR
.PP
This option can be used to restore a backup taken from one node group to a different node group\&. Its argument is a list of the form
\fIsource_node_group\fR, \fItarget_node_group\fR\&.
.PP
.\" ndb_restore: no-binlog option
.\" no-binlog option (ndb_restore)
\fB\-\-no\-binlog\fR
.PP
This option prevents any connected SQL nodes from writing data restored by
\fBndb_restore\fR
to their binary logs\&. Available beginning with MySQL Cluster NDB 6\&.2\&.16 and MySQL Cluster NDB 6\&.3\&.16\&.
.PP
.\" ndb_restore: no-restore-disk-objects option
.\" no-restore-disk-objects option (ndb_restore)
\fB\-\-no\-restore\-disk\-objects\fR,
\fB\-d\fR
.PP
This option stops
\fBndb_restore\fR
from restoring any MySQL Cluster Disk Data objects, such as tablespaces and log file groups; see
Section\ \&17.5.12, \(lqMySQL Cluster Disk Data Tables\(rq, for more information about these\&. Added in MySQL 5\&.1\&.6\&.
.PP
.\" ndb_restore: parallelism option
.\" parallelism option (ndb_restore)
\fB\-\-parallelism=#\fR,
\fB\-p\fR
.PP
Determines the maximum number of parallel transactions that
\fBndb_restore\fR
tries to use\&. By default, this is 128; the minimum is 1, and the maximum is 1024\&.
.PP
.\" ndb_restore: progress-frequency option
.\" progress-frequency option (ndb_restore)
\fB\-\-progress\-frequency=\fR\fB\fIN\fR\fR
.PP
Print a status report each
\fIN\fR
seconds while the backup is in progress\&. 0 (the default) causes no status reports to be printed\&. The maximum is 65535\&.
.PP
.\" ndb_restore: verbose option
.\" verbose option (ndb_restore)
\fB\-\-verbose=#\fR
.PP
Sets the level for the verbosity of the output\&. The minimum is 0; the maximum is 255\&. The default value is 1\&.
.PP
Beginning with MySQL 5\&.1\&.18, it is possible to restore only selected databases, or selected tables from a single database, using the syntax shown here:
.sp
.if n \{\
.RS 4
.\}
.nf
ndb_restore \fIother_options\fR \fIdb_name\fR,[\fIdb_name\fR[,\&.\&.\&.] | \fItbl_name\fR[,\fItbl_name\fR][,\&.\&.\&.]]
.fi
.if n \{\
.RE
.\}
.PP
In other words, you can specify either of the following to be restored:
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
All tables from one or more databases
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
One or more tables from a single database
.RE
.PP
.\" ndb_restore: include-databases option
.\" include-databases option (ndb_restore)
\fB\-\-include\-databases=\fR\fB\fIdb_name\fR\fR\fB[,\fR\fB\fIdb_name\fR\fR\fB][,\&.\&.\&.]\fR
.TS
allbox tab(:);
l l s s
l l s s
l l s s
^ l l s
^ l l s.
T{
\fBIntroduced\fR
T}:T{
5\&.1\&.32\-ndb\-6\&.4\&.3
T}
T{
\fBCommand\-Line Format\fR
T}:T{
\-\-include\-databases=db\-list
T}
T{
\ \&
T}:T{
\fBPermitted Values\fR
T}
:T{
\fBType\fR
T}:T{
string
T}
:T{
\fBDefault\fR
T}:T{
T}
.TE
.sp 1
.PP
.\" ndb_restore: include-tables option
.\" include-tables option (ndb_restore)
\fB\-\-include\-tables=\fR\fB\fIdb_name\&.tbl_name\fR\fR\fB[,\fR\fB\fIdb_name\&.tbl_name\fR\fR\fB][,\&.\&.\&.]\fR
.TS
allbox tab(:);
l l s s
l l s s
l l s s
^ l l s
^ l l s.
T{
\fBIntroduced\fR
T}:T{
5\&.1\&.32\-ndb\-6\&.4\&.3
T}
T{
\fBCommand\-Line Format\fR
T}:T{
\-\-include\-tables=table\-list
T}
T{
\ \&
T}:T{
\fBPermitted Values\fR
T}
:T{
\fBType\fR
T}:T{
string
T}
:T{
\fBDefault\fR
T}:T{
T}
.TE
.sp 1
.PP
Beginning with MySQL Cluster NDB 6\&.3\&.22 and MySQL Cluster NDB 6\&.4\&.3, you can (and should) use instead the
\fB\-\-include\-databases\fR
option or the
\fB\-\-include\-tables\fR
option for restoring only specific databases or tables, respectively\&.
\fB\-\-include\-databases\fR
takes a comma\-delimited list of databases to be restored\&.
\fB\-\-include\-tables\fR
takes a comma\-delimited list of tables (in
\fIdatabase\fR\&.\fItable\fR
format) to be restored\&.
.PP
When
\fB\-\-include\-databases\fR
or
\fB\-\-include\-tables\fR
is used, only those databases or tables named by the option are restored; all other databases and tables are excluded by
\fBndb_restore\fR, and are not restored\&.
.PP
The following table shows several invocations of
\fBndb_restore\fR
using
\fB\-\-include\-*\fR
options (other options possibly required have been omitted for clarity), and the effects these have on restoring from a MySQL Cluster backup:
.TS
allbox tab(:);
lB lB.
T{
Option Used
T}:T{
Result
T}
.T&
l l
l l
l l
l l.
T{
\fB\-\-include\-databases=db1\fR
T}:T{
Only tables in database db1 are restored; all tables
                in all other databases are ignored
T}
T{
\fB\-\-include\-databases=db1,db2\fR (or
                \fB\-\-include\-databases=db1\fR
                \fB\-\-include\-databases=db2\fR)
T}:T{
Only tables in databases db1 and
                db2 are restored; all tables in all
                other databases are ignored
T}
T{
\fB\-\-include\-tables=db1\&.t1\fR
T}:T{
Only table t1 in database db1 is
                restored; no other tables in db1 or
                in any other database are restored
T}
T{
\fB\-\-include\-tables=db1\&.t2,db2\&.t1\fR (or
                \fB\-\-include\-tables=db1\&.t2\fR
                \fB\-\-include\-tables=db2\&.t1\fR)
T}:T{
Only the table t2 in database db1
                and the table t1 in database
                db2 are restored; no other tables in
                db1, db2, or any
                other database are restored
T}
.TE
.sp 1
.PP
Beginning with MySQL Cluster NDB 6\&.3\&.29 and MySQL Cluster NDB 7\&.0\&.10, you can use these two options together\&. For example, the following causes all tables in databases
db1
and
db2, together with the tables
t1
and
t2
in database
db3, to be restored (and no other databases or tables):
.sp
.if n \{\
.RS 4
.\}
.nf
shell> \fBndb_restore [\&.\&.\&.] \-\-include\-databases=db1,db2 \-\-include\-tables=db3\&.t1,db3\&.t2\fR
.fi
.if n \{\
.RE
.\}
.PP
(Again we have omitted other, possibly required, options in the example just shown\&.)
.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
Prior to MySQL Cluster NDB 6\&.3\&.29 and MySQL Cluster NDB 7\&.0\&.10, multiple
\fB\-\-include\-*\fR
options were not handled correctly, and the result of the options shown in the previous example was that only the tables
db3\&.t1
and
db3\&.t2
were actually restored\&. (Bug #48907)
.sp .5v
.RE
.PP
.\" ndb_restore: exclude-databases option
.\" exclude-databases option (ndb_restore)
\fB\-\-exclude\-databases=\fR\fB\fIdb_name\fR\fR\fB[,\fR\fB\fIdb_name\fR\fR\fB][,\&.\&.\&.]\fR
.TS
allbox tab(:);
l l s s
l l s s
l l s s
^ l l s
^ l l s.
T{
\fBIntroduced\fR
T}:T{
5\&.1\&.32\-ndb\-6\&.4\&.3
T}
T{
\fBCommand\-Line Format\fR
T}:T{
\-\-exclude\-databases=db\-list
T}
T{
\ \&
T}:T{
\fBPermitted Values\fR
T}
:T{
\fBType\fR
T}:T{
string
T}
:T{
\fBDefault\fR
T}:T{
T}
.TE
.sp 1
.PP
.\" ndb_restore: exclude-tables option
.\" exclude-tables option (ndb_restore)
\fB\-\-exclude\-tables=\fR\fB\fIdb_name\&.tbl_name\fR\fR\fB[,\fR\fB\fIdb_name\&.tbl_name\fR\fR\fB][,\&.\&.\&.]\fR
.TS
allbox tab(:);
l l s s
l l s s
l l s s
^ l l s
^ l l s.
T{
\fBIntroduced\fR
T}:T{
5\&.1\&.32\-ndb\-6\&.4\&.3
T}
T{
\fBCommand\-Line Format\fR
T}:T{
\-\-exclude\-tables=table\-list
T}
T{
\ \&
T}:T{
\fBPermitted Values\fR
T}
:T{
\fBType\fR
T}:T{
string
T}
:T{
\fBDefault\fR
T}:T{
T}
.TE
.sp 1
.PP
Beginning with MySQL Cluster NDB 6\&.3\&.22 and MySQL Cluster NDB 6\&.4\&.3, it is possible to prevent one or more databases or tables from being restored using the
\fBndb_restore\fR
options
\fB\-\-exclude\-databases\fR
and
\fB\-\-exclude\-tables\fR\&.
\fB\-\-exclude\-databases\fR
takes a comma\-delimited list of one or more databases which should not be restored\&.
\fB\-\-exclude\-tables\fR
takes a comma\-delimited list of one or more tables (using
\fIdatabase\fR\&.\fItable\fR
format) which should not be restored\&.
.PP
When
\fB\-\-exclude\-databases\fR
or
\fB\-\-exclude\-tables\fR
is used, only those databases or tables named by the option are excluded; all other databases and tables are restored by
\fBndb_restore\fR\&.
.PP
This table shows several invocations of
\fBndb_restore\fR
usng
\fB\-\-exclude\-*\fR
options (other options possibly required have been omitted for clarity), and the effects these options have on restoring from a MySQL Cluster backup:
.TS
allbox tab(:);
lB lB.
T{
Option Used
T}:T{
Result
T}
.T&
l l
l l
l l
l l.
T{
\fB\-\-exclude\-databases=db1\fR
T}:T{
All tables in all databases except db1 are restored;
                no tables in db1 are restored
T}
T{
\fB\-\-exclude\-databases=db1,db2\fR (or
                \fB\-\-exclude\-databases=db1\fR
                \fB\-\-exclude\-databases=db2\fR)
T}:T{
All tables in all databases except db1 and
                db2 are restored; no tables in
                db1 or db2 are
                restored
T}
T{
\fB\-\-exclude\-tables=db1\&.t1\fR
T}:T{
All tables except t1 in database
                db1 are restored; all other tables in
                db1 are restored; all tables in all
                other databases are restored
T}
T{
\fB\-\-exclude\-tables=db1\&.t2,db2\&.t1\fR (or
                \fB\-\-exclude\-tables=db1\&.t2\fR
                \fB\-\-exclude\-tables=db2\&.t1)\fR
T}:T{
All tables in database db1 except for
                t2 and all tables in database
                db2 except for table
                t1 are restored; no other tables in
                db1 or db2 are
                restored; all tables in all other databases are restored
T}
.TE
.sp 1
.PP
Beginning with MySQL Cluster NDB 6\&.3\&.29 and MySQL Cluster NDB 7\&.0\&.10, you can use these two options together\&. For example, the following causes all tables in all databases
\fIexcept for\fR
databases
db1
and
db2, along with the tables
t1
and
t2
in database
db3,
\fInot\fR
to be restored:
.sp
.if n \{\
.RS 4
.\}
.nf
shell> \fBndb_restore [\&.\&.\&.] \-\-exclude\-databases=db1,db2 \-\-exclude\-tables=db3\&.t1,db3\&.t2\fR
.fi
.if n \{\
.RE
.\}
.PP
(Again, we have omitted other possibly necessary options in the interest of clarity and brevity from the example just shown\&.)
.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
Prior to MySQL Cluster NDB 6\&.3\&.29 and MySQL Cluster NDB 7\&.0\&.10, multiple
\fB\-\-exclude\-*\fR
options were not handled correctly, with the result that the options shown in the previous example caused ndb_restore to exclude only the tables
db3\&.t1
and
db3\&.t2\&. (Bug #48907)
.sp .5v
.RE
.PP
Beginning with MySQL Cluster NDB 6\&.3\&.29 and MySQL Cluster NDB 7\&.0\&.10, you can use
\fB\-\-include\-*\fR
and
\fB\-\-exclude\-*\fR
options together, subject to the following rules:
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
The actions of all
\fB\-\-include\-*\fR
and
\fB\-\-exclude\-*\fR
options are cumulative\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
All
\fB\-\-include\-*\fR
and
\fB\-\-exclude\-*\fR
options are evaluated in the order passed to ndb_restore, from right to left\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
In the event of conflicting options, the first (rightmost) option takes precedence\&. In other words, the first option (going from right to left) that matches against a given database or table
\(lqwins\(rq\&.
.RE
.PP
For example, the following set of options causes
\fBndb_restore\fR
to restore all tables from database
db1
except
db1\&.t1, while restoring no other tables from any other databases:
.sp
.if n \{\
.RS 4
.\}
.nf
\-\-include\-databases=db1 \-\-exclude\-tables=db1\&.t1
.fi
.if n \{\
.RE
.\}
.PP
However, reversing the order of the options just given simply causes all tables from database
db1
to be restored (including
db1\&.t1, but no tables from any other database), because the
\fB\-\-include\-databases\fR
option, being farthest to the right, is the first match against database
db1
and thus takes precedence over any other option that matches
db1
or any tables in
db1:
.sp
.if n \{\
.RS 4
.\}
.nf
\-\-exclude\-tables=db1\&.t1 \-\-include\-databases=db1
.fi
.if n \{\
.RE
.\}
.sp
.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
Prior to MySQL Cluster NDB 6\&.3\&.29 and MySQL Cluster NDB 7\&.0\&.10, it was not possible to use
\fB\-\-include\-databases\fR
or
\fB\-\-include\-tables\fR
together with
\fB\-\-exclude\-databases\fR
or
\fB\-\-exclude\-tables\fR, as these combinations were evaluated inconsistently\&. (Bug #48907)
.sp .5v
.RE
.PP
.\" ndb_restore: exclude-missing-columns option
.\" exclude-missing-columns option (ndb_restore)
\fB\-\-exclude\-missing\-columns\fR
.TS
allbox tab(:);
l l s s
l l s s.
T{
\fBIntroduced\fR
T}:T{
5\&.1\&.35\-ndb\-7\&.0\&.7
T}
T{
\fBCommand\-Line Format\fR
T}:T{
\-\-exclude\-missing\-columns
T}
.TE
.sp 1
.PP
Beginning with MySQL Cluster NDB 6\&.3\&.26 and MySQL Cluster NDB 7\&.0\&.7, it is also possible to restore only selected table columns using the
\fB\-\-exclude\-missing\-columns\fR
option\&. When this option is used,
\fBndb_restore\fR
ignores any columns missing from tables being restored as compared to the versions of those tables found in the backup\&. This option applies to all tables being restored\&. If you wish to apply this option only to selected tables or databases, you can use it in combination with one or more of the options described in the previous paragraph to do so, then restore data to the remaining tables using a complementary set of these options\&.
.PP
.\" ndb_restore: disable-indexes option
.\" disable-indexes option (ndb_restore)
\fB\-\-disable\-indexes\fR
.TS
allbox tab(:);
l l s s
l l s s.
T{
\fBIntroduced\fR
T}:T{
5\&.1\&.41\-ndb\-7\&.1\&.2
T}
T{
\fBCommand\-Line Format\fR
T}:T{
\-\-disable\-indexes
T}
.TE
.sp 1
.PP
Beginning with MySQL Cluster NDB 6\&.3\&.31, MySQL Cluster NDB 7\&.0\&.11, and MySQL CLuster NDB 7\&.1\&.2, you can use this option with
\fBndb_restore\fR
to 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 multi\-threaded building of indexes using
\fB\-\-rebuild\-indexes\fR, which should be faster than rebuilding indexes concurrently for very large tables\&.
.PP
.\" ndb_restore: rebuild-indexes option
.\" rebuild-indexes option (ndb_restore)
\fB\-\-rebuild\-indexes\fR
.TS
allbox tab(:);
l l s s
l l s s.
T{
\fBIntroduced\fR
T}:T{
5\&.1\&.41\-ndb\-7\&.1\&.2
T}
T{
\fBCommand\-Line Format\fR
T}:T{
\-\-rebuild\-indexes
T}
.TE
.sp 1
.PP
Beginning with MySQL Cluster NDB 6\&.3\&.31, MySQL Cluster NDB 7\&.0\&.11, and MySQL CLuster NDB 7\&.1\&.2, you can use this option with
\fBndb_restore\fR
to cause multi\-threaded rebuilding of the ordered indexes while restoring a native
NDB
backup\&.
.PP
.\" ndb_restore: skip-broken-objects option
.\" skip-broken-objects option (ndb_restore)
\fB\-\-skip\-broken\-objects\fR
.TS
allbox tab(:);
l l s s
l l s s.
T{
\fBIntroduced\fR
T}:T{
5\&.1\&.51\-ndb\-7\&.1\&.10
T}
T{
\fBCommand\-Line Format\fR
T}:T{
\-\-skip\-broken\-objects
T}
.TE
.sp 1
.PP
This option causes
\fBndb_restore\fR
to ignore corrupt tables while reading a native
NDB
backup, and to continue restoring any remaining tables (that are not also corrupted)\&. Currently, the
\fB\-\-skip\-broken\-objects\fR
option works only in the case of missing blob parts tables\&.
.PP
This option was added in MySQL Cluster NDB 6\&.3\&.40, MySQL Cluster NDB 7\&.0\&.21, and MySQL CLuster NDB 7\&.1\&.10\&.
.PP
.\" ndb_restore: skip-unknown-objects option
.\" skip-unknown-objects option (ndb_restore)
\fB\-\-skip\-unknown\-objects\fR
.TS
allbox tab(:);
l l s s
l l s s.
T{
\fBIntroduced\fR
T}:T{
5\&.1\&.41\-ndb\-7\&.1\&.4
T}
T{
\fBCommand\-Line Format\fR
T}:T{
\-\-skip\-unknown\-objects
T}
.TE
.sp 1
.PP
This option causes
\fBndb_restore\fR
to ignore any schema objects it does not recognize while reading a native
NDB
backup\&. This can be used for restoring a backup made from a cluster running MySQL Cluster NDB 7\&.0 to a cluster running MySQL Cluster NDB 6\&.3\&.
.PP
This option was added in MySQL Cluster NDB 6\&.3\&.34, MySQL Cluster NDB 7\&.0\&.15, and MySQL CLuster NDB 7\&.1\&.4\&.
.PP
.\" ndb_restore: rewrite-database option
.\" rewrite-database option (ndb_restore)
\fB\-\-rewrite\-database=\fR\fB\fIold_dbname\fR\fR\fB,\fR\fB\fInew_dbname\fR\fR
.TS
allbox tab(:);
l l s s
l l s s
l l s s
^ l l s
^ l l s.
T{
\fBIntroduced\fR
T}:T{
5\&.1\&.51\-ndb\-7\&.1\&.11
T}
T{
\fBCommand\-Line Format\fR
T}:T{
\-\-rewrite\-database=olddb,newdb
T}
T{
\ \&
T}:T{
\fBPermitted Values\fR
T}
:T{
\fBType\fR
T}:T{
string
T}
:T{
\fBDefault\fR
T}:T{
none
T}
.TE
.sp 1
.PP
This option makes it possible to restore to a database having a different name from that used in the backup\&. For example, if a backup is made of a database named
products, you can restore the data it contains to a database named
inventory, use this option as shown here (omitting any other options that might be required):
.sp
.if n \{\
.RS 4
.\}
.nf
shell> ndb_restore \-\-rewrite\-database=product,inventory
.fi
.if n \{\
.RE
.\}
.PP
The option can be employed multiple times in a single invocation of
\fBndb_restore\fR\&. Thus it is possible to restore simultaneously from a database named
db1
to a database named
db2
and from a database named
db3
to one named
db4
using
\fB\-\-rewrite\-database=db1,db2 \-\-rewrite\-database=db3,db4\fR\&. Other
\fBndb_restore\fR
options may be used between multiple occurrences of
\fB\-\-rewrite\-database\fR\&.
.PP
In the event of conflicts between multiple
\fB\-\-rewrite\-database\fR
options, the last
\fB\-\-rewrite\-database\fR
option used, reading from left to right, is the one that takes effect\&. For example, if
\fB\-\-rewrite\-database=db1,db2 \-\-rewrite\-database=db1,db3\fR
is used, only
\fB\-\-rewrite\-database=db1,db3\fR
is honored, and
\fB\-\-rewrite\-database=db1,db2\fR
is ignored\&. It is also possible to restore from multiple databases to a single database, so that
\fB\-\-rewrite\-database=db1,db3 \-\-rewrite\-database=db2,db3\fR
restores all tables and data from databases
db1
and
db2
into database
db3\&.
.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
.PP
When restoring from multiple backup databases into a single target database using
\fB\-\-rewrite\-database\fR, no check is made for collisions between table or other object names, and the order in which rows are restored is not guaranteed\&. This means that it is possible in such cases for rows to be overwritten and updates to be lost\&.
.sp .5v
.RE
.PP
This option was added in MySQL Cluster NDB 6\&.3\&.41, MySQL Cluster NDB 7\&.0\&.22, and MySQL Cluster NDB 7\&.1\&.11\&.
.PP
\fBError reporting\fR. .\" ndb_restore: errors
\fBndb_restore\fR
reports both temporary and permanent errors\&. In the case of temporary errors, it may able to recover from them\&. Beginning with MySQL 5\&.1\&.12, it reports
Restore successful, but encountered temporary error, please look at configuration
in such cases\&.
.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
.PP
After using
\fBndb_restore\fR
to initialize a MySQL Cluster for use in circular replication, binary logs on the SQL node acting as the replication slave are not automatically created, and you must cause them to be created manually\&. To cause the binary logs to be created, issue a
SHOW TABLES
statement on that SQL node before running
START SLAVE\&. This is a known issue in MySQL Cluster\&.
.sp .5v
.RE
.SH "COPYRIGHT"
.br
.PP
Copyright \(co 1997, 2013, Oracle and/or its affiliates. All rights reserved.
.PP
This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License.
.PP
This documentation is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
.PP
You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/.
.sp
.SH "SEE ALSO"
For more information, please refer to the MySQL Reference Manual,
which may already be installed locally and which is also available
online at http://dev.mysql.com/doc/.
.SH AUTHOR
Oracle Corporation (http://dev.mysql.com/).