~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to client/drizzledump.1

  • Committer: Padraig O'Sullivan
  • Date: 2009-09-13 00:53:34 UTC
  • mto: (1126.9.2 captain-20090915-01)
  • mto: This revision was merged to the branch mainline in revision 1133.
  • Revision ID: osullivan.padraig@gmail.com-20090913005334-6wio2sbjugskfbm3
Added calls to the connection start/end dtrace probes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
.\"     Title: \fBdrizzledump\fR
 
1
.\"     Title: \fBmysqldump\fR
2
2
.\"    Author: 
3
3
.\" Generator: DocBook XSL Stylesheets v1.70.1 <http://docbook.sf.net/>
4
4
.\"      Date: 05/23/2009
5
 
.\"    Manual: drizzle Database System
6
 
.\"    Source: drizzle 6.0
 
5
.\"    Manual: MySQL Database System
 
6
.\"    Source: MySQL 6.0
7
7
.\"
8
 
.TH "\fBMYSQLDUMP\fR" "1" "05/23/2009" "drizzle" "drizzle Database System"
 
8
.TH "\fBMYSQLDUMP\fR" "1" "05/23/2009" "MySQL 6.0" "MySQL Database System"
9
9
.\" disable hyphenation
10
10
.nh
11
11
.\" disable justification (adjust text to left margin only)
12
12
.ad l
13
13
.SH "NAME"
14
 
drizzledump \- a database backup program
 
14
mysqldump \- a database backup program
15
15
.SH "SYNOPSIS"
16
16
.HP 45
17
 
\fBdrizzledump [\fR\fB\fIoptions\fR\fR\fB] [\fR\fB\fIdb_name\fR\fR\fB [\fR\fB\fItbl_name\fR\fR\fB ...]]\fR
 
17
\fBmysqldump [\fR\fB\fIoptions\fR\fR\fB] [\fR\fB\fIdb_name\fR\fR\fB [\fR\fB\fItbl_name\fR\fR\fB ...]]\fR
18
18
.SH "DESCRIPTION"
19
19
.PP
20
20
The
21
 
\fBdrizzledump\fR
22
 
client is a backup program originally written by Igor Romanenko. It can be used to dump a database or a collection of databases for backup or transfer to another SQL server (not necessarily a drizzle server). The dump typically contains SQL statements to create the table, populate it, or both. However,
23
 
\fBdrizzledump\fR
 
21
\fBmysqldump\fR
 
22
client is a backup program originally written by Igor Romanenko. It can be used to dump a database or a collection of databases for backup or transfer to another SQL server (not necessarily a MySQL server). The dump typically contains SQL statements to create the table, populate it, or both. However,
 
23
\fBmysqldump\fR
24
24
can also be used to generate files in CSV, other delimited text, or XML format.
25
25
.PP
 
26
If you are doing a backup on the server and your tables all are
 
27
MyISAM
 
28
tables, consider using the
 
29
\fBmysqlhotcopy\fR
 
30
instead because it can accomplish faster backups and faster restores. See
 
31
\fBmysqlhotcopy\fR(1).
 
32
.PP
26
33
There are three general ways to invoke
27
 
\fBdrizzledump\fR:
 
34
\fBmysqldump\fR:
28
35
.sp
29
36
.RS 3n
30
37
.nf
31
 
shell> \fBdrizzledump [\fR\fB\fIoptions\fR\fR\fB] \fR\fB\fIdb_name\fR\fR\fB [\fR\fB\fItables\fR\fR\fB]\fR
32
 
shell> \fBdrizzledump [\fR\fB\fIoptions\fR\fR\fB] \-\-databases \fR\fB\fIdb_name1\fR\fR\fB [\fR\fB\fIdb_name2\fR\fR\fB \fR\fB\fIdb_name3\fR\fR\fB...]\fR
33
 
shell> \fBdrizzledump [\fR\fB\fIoptions\fR\fR\fB] \-\-all\-databases\fR
 
38
shell> \fBmysqldump [\fR\fB\fIoptions\fR\fR\fB] \fR\fB\fIdb_name\fR\fR\fB [\fR\fB\fItables\fR\fR\fB]\fR
 
39
shell> \fBmysqldump [\fR\fB\fIoptions\fR\fR\fB] \-\-databases \fR\fB\fIdb_name1\fR\fR\fB [\fR\fB\fIdb_name2\fR\fR\fB \fR\fB\fIdb_name3\fR\fR\fB...]\fR
 
40
shell> \fBmysqldump [\fR\fB\fIoptions\fR\fR\fB] \-\-all\-databases\fR
34
41
.fi
35
42
.RE
36
43
.PP
42
49
\fB\-\-all\-databases\fR
43
50
option, entire databases are dumped.
44
51
.PP
45
 
\fBdrizzledump\fR
 
52
\fBmysqldump\fR
46
53
does not dump the
47
54
INFORMATION_SCHEMA
48
55
database. If you name that database explicitly on the command line,
49
 
\fBdrizzledump\fR
 
56
\fBmysqldump\fR
50
57
silently ignores it.
51
58
.PP
52
59
To get a list of the options your version of
53
 
\fBdrizzledump\fR
 
60
\fBmysqldump\fR
54
61
supports, execute
55
 
\fBdrizzledump \-\-help\fR.
 
62
\fBmysqldump \-\-help\fR.
56
63
.PP
57
64
Some
58
 
\fBdrizzledump\fR
 
65
\fBmysqldump\fR
59
66
options are shorthand for groups of other options.
60
67
\fB\-\-opt\fR
61
68
and
90
97
option for each feature. For example, to disable extended inserts and memory buffering, use
91
98
\fB\-\-opt\fR
92
99
\fB\-\-skip\-extended\-insert\fR
93
 
\fB\-\-skip\-quick\fR. (
 
100
\fB\-\-skip\-quick\fR. (As of MySQL 6.0,
94
101
\fB\-\-skip\-extended\-insert\fR
95
102
\fB\-\-skip\-quick\fR
96
103
is sufficient because
115
122
\fB\-\-skip\-opt\fR
116
123
by itself.
117
124
.PP
118
 
\fBdrizzledump\fR
 
125
\fBmysqldump\fR
119
126
can retrieve and dump table contents row by row, or it can retrieve the entire content from a table and buffer it in memory before dumping it. Buffering in memory can be a problem if you are dumping large tables. To dump tables row by row, use the
120
127
\fB\-\-quick\fR
121
128
option (or
123
130
\fB\-\-quick\fR). The
124
131
\fB\-\-opt\fR
125
132
option (and hence
126
 
\fB\-\-quick\fR) is enabled by default; to enable memory buffering, use
 
133
\fB\-\-quick\fR) is enabled by default in MySQL 6.0; to enable memory buffering, use
127
134
\fB\-\-skip\-quick\fR.
128
135
.PP
129
136
If you are using a recent version of
130
 
\fBdrizzledump\fR
131
 
to generate a dump to be reloaded into a very old drizzle server, you should not use the
 
137
\fBmysqldump\fR
 
138
to generate a dump to be reloaded into a very old MySQL server, you should not use the
132
139
\fB\-\-opt\fR
133
140
or
134
141
\fB\-\-extended\-insert\fR
136
143
\fB\-\-skip\-opt\fR
137
144
instead.
138
145
.PP
139
 
\fBdrizzledump\fR
140
 
supports the options in the following list.
 
146
\fBmysqldump\fR
 
147
supports the options in the following list. It also reads option files and supports the options for processing them described at
 
148
Section\ 4.2.3.2.1, \(lqCommand\-Line Options that Affect Option\-File Handling\(rq.
141
149
.TP 3n
142
150
\(bu
143
151
\fB\-\-help\fR,
170
178
LOCK TABLES
171
179
and
172
180
UNLOCK TABLES
173
 
statements. This results in faster inserts when the dump file is reloaded.
 
181
statements. This results in faster inserts when the dump file is reloaded. See
 
182
Section\ 7.2.25, \(lqSpeed of INSERT Statements\(rq.
174
183
.TP 3n
175
184
\(bu
176
185
\fB\-\-all\-databases\fR,
196
205
CHANGE MASTER TO
197
206
statement and a
198
207
START SLAVE
199
 
statement at the end of the output.
 
208
statement at the end of the output. This option was added in MySQL 6.0.4.
200
209
.TP 3n
201
210
\(bu
202
211
\fB\-\-character\-sets\-dir=\fR\fB\fIpath\fR\fR
203
212
.sp
204
 
The directory where character sets are installed.
 
213
The directory where character sets are installed. See
 
214
Section\ 9.2, \(lqThe Character Set Used for Data and Sorting\(rq.
205
215
.TP 3n
206
216
\(bu
207
217
\fB\-\-comments\fR,
224
234
\(bu
225
235
\fB\-\-compatible=\fR\fB\fIname\fR\fR
226
236
.sp
227
 
Produce output that is more compatible with other database systems or with older drizzle servers. The value of
 
237
Produce output that is more compatible with other database systems or with older MySQL servers. The value of
228
238
name
229
239
can be
230
240
ansi,
237
247
maxdb,
238
248
no_key_options,
239
249
no_table_options, or
240
 
no_field_options. To use several values, separate them by commas. These values have the same meaning as the corresponding options for setting the server SQL mode.
 
250
no_field_options. To use several values, separate them by commas. These values have the same meaning as the corresponding options for setting the server SQL mode. See
 
251
Section\ 5.1.7, \(lqServer SQL Modes\(rq.
241
252
.sp
242
253
This option does not guarantee compatibility with other servers. It only enables those SQL mode values that are currently available for making dump output more compatible. For example,
243
254
\fB\-\-compatible=oracle\fR
262
273
\(bu
263
274
\fB\-\-create\-options\fR
264
275
.sp
265
 
Include all drizzle\-specific table options in the
 
276
Include all MySQL\-specific table options in the
266
277
CREATE TABLE
267
278
statements.
268
279
.TP 3n
271
282
\fB\-B\fR
272
283
.sp
273
284
Dump several databases. Normally,
274
 
\fBdrizzledump\fR
 
285
\fBmysqldump\fR
275
286
treats the first name argument on the command line as a database name and following names as table names. With this option, it treats all name arguments as database names.
276
287
CREATE DATABASE
277
288
and
286
297
\fIdebug_options\fR
287
298
string is
288
299
\'d:t:o,\fIfile_name\fR'. The default value is
289
 
\'d:t:o,/tmp/drizzledump.trace'.
 
300
\'d:t:o,/tmp/mysqldump.trace'.
290
301
.TP 3n
291
302
\(bu
292
303
\fB\-\-debug\-check\fR
303
314
.sp
304
315
Use
305
316
\fIcharset_name\fR
306
 
as the default character set. If no character set is specified,
307
 
\fBdrizzledump\fR
 
317
as the default character set. See
 
318
Section\ 9.2, \(lqThe Character Set Used for Data and Sorting\(rq. If no character set is specified,
 
319
\fBmysqldump\fR
308
320
uses
309
 
utf8
 
321
utf8, and earlier versions use
 
322
latin1.
310
323
.sp
311
324
This option has no effect for output data files produced by using the
312
325
\fB\-\-tab\fR
344
357
\(bu
345
358
\fB\-\-dump\-date\fR
346
359
.sp
347
 
\fBdrizzledump\fR
 
360
\fBmysqldump\fR
348
361
produces a
349
362
\-\- Dump completed on \fIDATE\fR
350
363
comment at the end of the dump if the
357
370
\fB\-\-dump\-date\fR
358
371
(include the date in the comment).
359
372
\fB\-\-skip\-dump\-date\fR
360
 
suppresses date printing.
 
373
suppresses date printing. This option was added in MySQL 6.0.4.
361
374
.TP 3n
362
375
\(bu
363
376
\fB\-\-dump\-slave[=\fR\fB\fIvalue\fR\fR\fB]\fR
368
381
CHANGE MASTER TO
369
382
statement that indicates the binary log coordinates (file name and position) of the dumped slave's master (rather than the coordinates of the dumped server, as is done by the
370
383
\fB\-\-master\-data\fR
371
 
option). These are the master server coordinates from which the slave should start replicating.
 
384
option). These are the master server coordinates from which the slave should start replicating. This option was added in MySQL 6.0.4.
372
385
.sp
373
386
The option value is handled the same way as for
374
387
\fB\-\-master\-data\fR
408
421
These options are used with the
409
422
\fB\-T\fR
410
423
option and have the same meaning as the corresponding clauses for
411
 
LOAD DATA INFILE. 
 
424
LOAD DATA INFILE. See
 
425
Section\ 12.2.6, \(lqLOAD DATA INFILE Syntax\(rq.
412
426
.TP 3n
413
427
\(bu
414
428
\fB\-\-first\-slave\fR,
421
435
\fB\-\-flush\-logs\fR,
422
436
\fB\-F\fR
423
437
.sp
424
 
Flush the drizzle server log files before starting the dump. This option requires the
 
438
Flush the MySQL server log files before starting the dump. This option requires the
425
439
RELOAD
426
440
privilege. Note that if you use this option in combination with the
427
441
\fB\-\-all\-databases\fR
443
457
Emit a
444
458
FLUSH PRIVILEGES
445
459
statement after dumping the
446
 
drizzle
 
460
mysql
447
461
database. This option should be used any time the dump contains the
448
 
drizzle
 
462
mysql
449
463
database and any other database that depends on the data in the
450
 
drizzle
 
464
mysql
451
465
database for proper restoration.
452
466
.TP 3n
453
467
\(bu
457
471
Continue even if an SQL error occurs during a table dump.
458
472
.sp
459
473
One use for this option is to cause
460
 
\fBdrizzledump\fR
 
474
\fBmysqldump\fR
461
475
to continue executing even when it encounters a view that has become invalid because the definition refers to a table that has been dropped. Without
462
476
\fB\-\-force\fR,
463
 
\fBdrizzledump\fR
 
477
\fBmysqldump\fR
464
478
exits with an error message. With
465
479
\fB\-\-force\fR,
466
 
\fBdrizzledump\fR
 
480
\fBmysqldump\fR
467
481
prints the error message, but it also writes an SQL comment containing the view definition to the dump output and continues executing.
468
482
.TP 3n
469
483
\(bu
470
484
\fB\-\-host=\fR\fB\fIhost_name\fR\fR,
471
485
\fB\-h \fR\fB\fIhost_name\fR\fR
472
486
.sp
473
 
Dump data from the drizzle server on the given host. The default host is
 
487
Dump data from the MySQL server on the given host. The default host is
474
488
localhost.
475
489
.TP 3n
476
490
\(bu
496
510
MASTER_PORT
497
511
and
498
512
MASTER_PORT
499
 
options for the host name and TCP/IP port number of the slave's master.
 
513
options for the host name and TCP/IP port number of the slave's master. This option was added in MySQL 6.0.4.
500
514
.TP 3n
501
515
\(bu
502
516
\fB\-\-ignore\-table=\fR\fB\fIdb_name.tbl_name\fR\fR
518
532
This option is used with the
519
533
\fB\-T\fR
520
534
option and has the same meaning as the corresponding clause for
521
 
LOAD DATA INFILE. 
 
535
LOAD DATA INFILE. See
 
536
Section\ 12.2.6, \(lqLOAD DATA INFILE Syntax\(rq.
522
537
.TP 3n
523
538
\(bu
524
539
\fB\-\-lock\-all\-tables\fR,
637
652
\fB\-\-extended\-insert\fR
638
653
\fB\-\-lock\-tables\fR
639
654
\fB\-\-quick\fR
640
 
\fB\-\-set\-charset\fR. It should give you a fast dump operation and produce a dump file that can be reloaded into a drizzle server quickly.
 
655
\fB\-\-set\-charset\fR. It should give you a fast dump operation and produce a dump file that can be reloaded into a MySQL server quickly.
641
656
.sp
642
657
\fIThe \fR\fI\fB\-\-opt\fR\fR\fI option is enabled by default. Use \fR\fI\fB\-\-skip\-opt\fR\fR\fI to disable it.\fR
643
658
See the discussion at the beginning of this section for information about selectively enabling or disabling certain of the options affected by
666
681
\fB\-p\fR
667
682
option on the command line, you are prompted for one.
668
683
.sp
669
 
Specifying a password on the command line should be considered insecure. 
 
684
Specifying a password on the command line should be considered insecure. See
 
685
Section\ 5.5.6.2, \(lqEnd\-User Guidelines for Password Security\(rq.
670
686
.TP 3n
671
687
\(bu
672
688
\fB\-\-pipe\fR,
683
699
\(bu
684
700
\fB\-\-protocol={TCP|SOCKET|PIPE|MEMORY}\fR
685
701
.sp
686
 
The connection protocol to use for connecting to the server. It is useful when the other connection parameters normally would cause a protocol to be used other than the one you want.
 
702
The connection protocol to use for connecting to the server. It is useful when the other connection parameters normally would cause a protocol to be used other than the one you want. For details on the allowable values, see
 
703
Section\ 4.2.2, \(lqConnecting to the MySQL Server\(rq.
687
704
.TP 3n
688
705
\(bu
689
706
\fB\-\-quick\fR,
690
707
\fB\-q\fR
691
708
.sp
692
709
This option is useful for dumping large tables. It forces
693
 
\fBdrizzledump\fR
 
710
\fBmysqldump\fR
694
711
to retrieve rows for a table from the server a row at a time rather than retrieving the entire row set and buffering it in memory before writing it out.
695
712
.TP 3n
696
713
\(bu
735
752
Dump stored routines (procedures and functions) from the dumped databases. Use of this option requires the
736
753
SELECT
737
754
privilege for the
738
 
drizzle.proc
 
755
mysql.proc
739
756
table. The output generated by using
740
757
\fB\-\-routines\fR
741
758
contains
746
763
.sp
747
764
If you require routines to be re\-created with their original timestamp attributes, do not use
748
765
\fB\-\-routines\fR. Instead, dump and reload the contents of the
749
 
drizzle.proc
750
 
table directly, using a drizzle account that has appropriate privileges for the
751
 
drizzle
 
766
mysql.proc
 
767
table directly, using a MySQL account that has appropriate privileges for the
 
768
mysql
752
769
database.
753
770
.TP 3n
754
771
\(bu
790
807
TRUNCATE TABLE. A consistent read is not isolated from those statements, so use of them on a table to be dumped can cause the
791
808
SELECT
792
809
performed by
793
 
\fBdrizzledump\fR
 
810
\fBmysqldump\fR
794
811
to retrieve the table contents to obtain incorrect contents or fail.
795
812
.sp
796
813
The
830
847
.sp
831
848
Options that begin with
832
849
\fB\-\-ssl\fR
833
 
specify whether to connect to the server via SSL and indicate where to find SSL keys and certificates. 
 
850
specify whether to connect to the server via SSL and indicate where to find SSL keys and certificates. See
 
851
Section\ 5.5.7.3, \(lqSSL Command Options\(rq.
834
852
.TP 3n
835
853
\(bu
836
854
\fB\-\-tab=\fR\fB\fIpath\fR\fR,
837
855
\fB\-T \fR\fB\fIpath\fR\fR
838
856
.sp
839
857
Produce tab\-separated data files. For each dumped table,
840
 
\fBdrizzledump\fR
 
858
\fBmysqldump\fR
841
859
creates a
842
860
\fI\fItbl_name\fR\fR\fI.sql\fR
843
861
file that contains the
866
884
.br
867
885
\fBNote\fR
868
886
This option should be used only when
869
 
\fBdrizzledump\fR
 
887
\fBmysqldump\fR
870
888
is run on the same machine as the
871
 
\fBdrizzled\fR
 
889
\fBmysqld\fR
872
890
server. You must have the
873
891
FILE
874
892
privilege, and the server must have permission to write files in the directory that you specify.
881
899
or
882
900
\fB\-B\fR
883
901
option.
884
 
\fBdrizzledump\fR
 
902
\fBmysqldump\fR
885
903
regards all name arguments following the option as table names.
886
904
.TP 3n
887
905
\(bu
896
914
This option enables
897
915
TIMESTAMP
898
916
columns to be dumped and reloaded between servers in different time zones.
899
 
\fBdrizzledump\fR
 
917
\fBmysqldump\fR
900
918
sets its connection time zone to UTC and adds
901
919
SET TIME_ZONE='+00:00'
902
920
to the dump file. Without this option,
912
930
\fB\-\-user=\fR\fB\fIuser_name\fR\fR,
913
931
\fB\-u \fR\fB\fIuser_name\fR\fR
914
932
.sp
915
 
The drizzle user name to use when connecting to the server.
 
933
The MySQL user name to use when connecting to the server.
916
934
.TP 3n
917
935
\(bu
918
936
\fB\-\-verbose\fR,
989
1007
.TE
990
1008
.sp
991
1009
The output from the
992
 
\fBdrizzle\fR
 
1010
\fBmysql\fR
993
1011
client when run using the
994
1012
\fB\-\-xml\fR
995
1013
option also follows these rules. (See
996
1014
the section called \(lq\fBMYSQL\fR OPTIONS\(rq.)
997
1015
.sp
998
1016
XML output from
999
 
\fBdrizzledump\fR
 
1017
\fBmysqldump\fR
1000
1018
includes the XML namespace, as shown here:
1001
1019
.sp
1002
1020
.RS 3n
1003
1021
.nf
1004
 
shell> \fBdrizzledump \-\-xml \-u root world City\fR
 
1022
shell> \fBmysqldump \-\-xml \-u root world City\fR
1005
1023
<?xml version="1.0"?>
1006
 
<drizzledump xmlns:xsi="http://www.w3.org/2001/XMLSchema\-instance">
 
1024
<mysqldump xmlns:xsi="http://www.w3.org/2001/XMLSchema\-instance">
1007
1025
<database name="world">
1008
1026
<table_structure name="City">
1009
1027
<field Field="ID" Type="int(11)" Null="NO" Key="PRI" Extra="auto_increment" />
1035
1053
</row>
1036
1054
</table_data>
1037
1055
</database>
1038
 
</drizzledump>
 
1056
</mysqldump>
1039
1057
.fi
1040
1058
.RE
1041
1059
.sp
1058
1076
\fB\-\-extended\-insert\fR
1059
1077
or
1060
1078
\fB\-\-opt\fR),
1061
 
\fBdrizzledump\fR
 
1079
\fBmysqldump\fR
1062
1080
creates rows up to
1063
1081
net_buffer_length
1064
1082
length. If you increase this variable, you should also ensure that the
1065
1083
net_buffer_length
1066
 
variable in the drizzle server is at least this large.
 
1084
variable in the MySQL server is at least this large.
1067
1085
.sp
1068
1086
.RE
1069
1087
.PP
1070
1088
The most common use of
1071
 
\fBdrizzledump\fR
 
1089
\fBmysqldump\fR
1072
1090
is probably for making a backup of an entire database:
1073
1091
.sp
1074
1092
.RS 3n
1075
1093
.nf
1076
 
shell> \fBdrizzledump \fR\fB\fIdb_name\fR\fR\fB > \fR\fB\fIbackup\-file.sql\fR\fR
 
1094
shell> \fBmysqldump \fR\fB\fIdb_name\fR\fR\fB > \fR\fB\fIbackup\-file.sql\fR\fR
1077
1095
.fi
1078
1096
.RE
1079
1097
.PP
1081
1099
.sp
1082
1100
.RS 3n
1083
1101
.nf
1084
 
shell> \fBdrizzle \fR\fB\fIdb_name\fR\fR\fB < \fR\fB\fIbackup\-file.sql\fR\fR
 
1102
shell> \fBmysql \fR\fB\fIdb_name\fR\fR\fB < \fR\fB\fIbackup\-file.sql\fR\fR
1085
1103
.fi
1086
1104
.RE
1087
1105
.PP
1089
1107
.sp
1090
1108
.RS 3n
1091
1109
.nf
1092
 
shell> \fBdrizzle \-e "source \fR\fB\fI/path\-to\-backup/backup\-file.sql\fR\fR\fB" \fR\fB\fIdb_name\fR\fR
 
1110
shell> \fBmysql \-e "source \fR\fB\fI/path\-to\-backup/backup\-file.sql\fR\fR\fB" \fR\fB\fIdb_name\fR\fR
1093
1111
.fi
1094
1112
.RE
1095
1113
.PP
1096
 
\fBdrizzledump\fR
1097
 
is also very useful for populating databases by copying data from one drizzle server to another:
 
1114
\fBmysqldump\fR
 
1115
is also very useful for populating databases by copying data from one MySQL server to another:
1098
1116
.sp
1099
1117
.RS 3n
1100
1118
.nf
1101
 
shell> \fBdrizzledump \-\-opt \fR\fB\fIdb_name\fR\fR\fB | drizzle \-\-host=\fR\fB\fIremote_host\fR\fR\fB \-C \fR\fB\fIdb_name\fR\fR
 
1119
shell> \fBmysqldump \-\-opt \fR\fB\fIdb_name\fR\fR\fB | mysql \-\-host=\fR\fB\fIremote_host\fR\fR\fB \-C \fR\fB\fIdb_name\fR\fR
1102
1120
.fi
1103
1121
.RE
1104
1122
.PP
1106
1124
.sp
1107
1125
.RS 3n
1108
1126
.nf
1109
 
shell> \fBdrizzledump \-\-databases \fR\fB\fIdb_name1\fR\fR\fB [\fR\fB\fIdb_name2\fR\fR\fB ...] > my_databases.sql\fR
 
1127
shell> \fBmysqldump \-\-databases \fR\fB\fIdb_name1\fR\fR\fB [\fR\fB\fIdb_name2\fR\fR\fB ...] > my_databases.sql\fR
1110
1128
.fi
1111
1129
.RE
1112
1130
.PP
1116
1134
.sp
1117
1135
.RS 3n
1118
1136
.nf
1119
 
shell> \fBdrizzledump \-\-all\-databases > all_databases.sql\fR
 
1137
shell> \fBmysqldump \-\-all\-databases > all_databases.sql\fR
1120
1138
.fi
1121
1139
.RE
1122
1140
.PP
1123
1141
For
1124
1142
InnoDB
1125
1143
tables,
1126
 
\fBdrizzledump\fR
 
1144
\fBmysqldump\fR
1127
1145
provides a way of making an online backup:
1128
1146
.sp
1129
1147
.RS 3n
1130
1148
.nf
1131
 
shell> \fBdrizzledump \-\-all\-databases \-\-single\-transaction > all_databases.sql\fR
 
1149
shell> \fBmysqldump \-\-all\-databases \-\-single\-transaction > all_databases.sql\fR
1132
1150
.fi
1133
1151
.RE
1134
1152
.PP
1135
1153
This backup acquires a global read lock on all tables (using
1136
1154
FLUSH TABLES WITH READ LOCK) at the beginning of the dump. As soon as this lock has been acquired, the binary log coordinates are read and the lock is released. If long updating statements are running when the
1137
1155
FLUSH
1138
 
statement is issued, the drizzle server may get stalled until those statements finish. After that, the dump becomes lock\-free and does not disturb reads and writes on the tables. If the update statements that the drizzle server receives are short (in terms of execution time), the initial lock period should not be noticeable, even with many updates.
 
1156
statement is issued, the MySQL server may get stalled until those statements finish. After that, the dump becomes lock\-free and does not disturb reads and writes on the tables. If the update statements that the MySQL server receives are short (in terms of execution time), the initial lock period should not be noticeable, even with many updates.
1139
1157
.PP
1140
1158
For point\-in\-time recovery (also known as
1141
1159
\(lqroll\-forward,\(rq
1142
 
when you need to restore an old backup and replay the changes that happened since that backup), it is often useful to rotate the binary log , \(lqThe Binary Log\(rq) or at least know the binary log coordinates to which the dump corresponds:
 
1160
when you need to restore an old backup and replay the changes that happened since that backup), it is often useful to rotate the binary log (see
 
1161
Section\ 5.2.4, \(lqThe Binary Log\(rq) or at least know the binary log coordinates to which the dump corresponds:
1143
1162
.sp
1144
1163
.RS 3n
1145
1164
.nf
1146
 
shell> \fBdrizzledump \-\-all\-databases \-\-master\-data=2 > all_databases.sql\fR
 
1165
shell> \fBmysqldump \-\-all\-databases \-\-master\-data=2 > all_databases.sql\fR
1147
1166
.fi
1148
1167
.RE
1149
1168
.PP
1151
1170
.sp
1152
1171
.RS 3n
1153
1172
.nf
1154
 
shell> \fBdrizzledump \-\-all\-databases \-\-flush\-logs \-\-master\-data=2\fR
 
1173
shell> \fBmysqldump \-\-all\-databases \-\-flush\-logs \-\-master\-data=2\fR
1155
1174
              \fB> all_databases.sql\fR
1156
1175
.fi
1157
1176
.RE
1164
1183
InnoDB
1165
1184
storage engine.
1166
1185
.PP
1167
 
If you encounter problems backing up views, please read the section that covers restrictions on views which describes a workaround for backing up views when this fails due to insufficient privileges. 
 
1186
For more information on making backups, see
 
1187
Section\ 6.1, \(lqDatabase Backups\(rq, and
 
1188
Section\ 6.2, \(lqExample Backup and Recovery Strategy\(rq.
 
1189
.PP
 
1190
If you encounter problems backing up views, please read the section that covers restrictions on views which describes a workaround for backing up views when this fails due to insufficient privileges. See
 
1191
Section\ D.5, \(lqRestrictions on Views\(rq.
1168
1192
.SH "COPYRIGHT"
1169
1193
.PP
1170
1194
Copyright 2007\-2008 MySQL AB, 2009 Sun Microsystems, Inc.
1171
 
Copyright 2010 Drizzle Team
1172
1195
.PP
1173
1196
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.
1174
1197
.PP
1176
1199
.PP
1177
1200
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/.
1178
1201
.SH "SEE ALSO"
1179
 
For more information, please refer to http://www.drizzle.org/wiki.
 
1202
For more information, please refer to the MySQL Reference Manual,
 
1203
which may already be installed locally and which is also available
 
1204
online at http://dev.mysql.com/doc/.
1180
1205
.SH AUTHOR
1181
 
Sun Microsystems, Inc. (http://www.mysql.com/), Drizzle Team
 
1206
Sun Microsystems, Inc. (http://www.mysql.com/).