34
34
.. option:: --all-databases, -A
36
Dumps all databases found on the server apart from ``information_schema`` and
37
``data_dictionary`` in Drizzle and ``information_schema``,
38
``performance_schema`` and ``mysql`` in MySQL.
36
Dumps all databases found on the server apart from ``information_schema`` and
37
``data_dictionary`` in Drizzle and ``information_schema``,
38
``performance_schema`` and ``mysql`` in MySQL.
40
40
.. option:: --force, -f
42
Continue even if we get an sql-error.
42
Continue even if we get an sql-error.
44
44
.. option:: --help, -?
46
Show a message with all the available options.
46
Show a message with all the available options.
48
48
.. option:: --lock-all-tables, -x
50
Locks all the tables for all databases with a global read lock. The lock is
51
released automatically when :program:`drizzledump` ends.
52
Turns on :option:`--single-transaction` and :option:`--lock-tables`.
50
Locks all the tables for all databases with a global read lock. The lock is
51
released automatically when :program:`drizzledump` ends.
52
Turns on :option:`--single-transaction` and :option:`--lock-tables`.
54
54
.. option:: --single-transaction
56
Creates a consistent snapshot by dumping the tables in a single transaction.
57
During the snapshot no other connected client should use any of the
58
following as this will implicitly commit the transaction and prevent the
56
Creates a consistent snapshot by dumping the tables in a single transaction.
57
During the snapshot no other connected client should use any of the
58
following as this will implicitly commit the transaction and prevent the
68
Only works with InnoDB.
68
Only works with InnoDB.
70
70
.. option:: --skip-opt
72
A shortcut for :option:`--skip-drop-table`, :option:`--skip-create`,
73
:option:`--skip-extended-insert` and :option:`--skip-disable-keys`
72
A shortcut for :option:`--skip-drop-table`, :option:`--skip-create`,
73
:option:`--skip-extended-insert` and :option:`--skip-disable-keys`
75
75
.. option:: --tables t1 t2 ...
77
Dump a list of tables.
77
Dump a list of tables.
79
79
.. option:: --show-progress-size rows (=10000)
81
Show progress of the dump every *rows* of the dump. Requires
81
Show progress of the dump every *rows* of the dump. Requires
84
84
.. option:: --verbose, -v
86
Sends various verbose information to stderr as the dump progresses.
86
Sends various verbose information to stderr as the dump progresses.
88
88
.. option:: --skip-extended-insert
90
Dump every row on an individual line. For example:
90
Dump every row on an individual line. For example:
92
92
.. code-block:: mysql
97
97
.. option:: --skip-dump-date
99
Do not display the date/time at the end of the dump.
99
Do not display the date/time at the end of the dump.
101
101
.. option:: --no-defaults
103
Do not attempt to read configuration from configuration files.
103
Do not attempt to read configuration from configuration files.
105
105
.. option:: --add-drop-database
107
Add ``DROP DATABASE`` statements before ``CREATE DATABASE``.
107
Add ``DROP DATABASE`` statements before ``CREATE DATABASE``.
109
109
.. option:: --compact
111
Gives a more compact output by disabling header/footer comments and enabling
112
:option:`--skip-add-drop-table`, :option:`--skip-disable-keys`
113
and :option:`--skip-add-locks`.
111
Gives a more compact output by disabling header/footer comments and enabling
112
:option:`--skip-add-drop-table`, :option:`--skip-disable-keys`
113
and :option:`--skip-add-locks`.
115
115
.. option:: --databases, -B
117
Dump several databases. The databases do not need to follow on after this
118
option, they can be anywhere in the command line.
117
Dump several databases. The databases do not need to follow on after this
118
option, they can be anywhere in the command line.
120
120
.. option:: --skip-disable-keys, -K
122
Do not dump the statements ``ALTER TABLE ... DISABLE KEYS`` and
123
``ALTER TABLE ... ENABLE KEYS``
122
Do not dump the statements ``ALTER TABLE ... DISABLE KEYS`` and
123
``ALTER TABLE ... ENABLE KEYS``
125
125
.. option:: --ignore-table table
127
Do not dump specified table, needs to be in the format ``database.table``.
128
Can be specified multiple times for multiple tables.
127
Do not dump specified table, needs to be in the format ``database.table``.
128
Can be specified multiple times for multiple tables.
130
130
.. option:: --insert-ignore
132
Add the ``IGNORE`` keyword into every ``INSERT`` statement.
132
Add the ``IGNORE`` keyword into every ``INSERT`` statement.
134
134
.. option:: --no-autocommit
136
Make the dump of each table a single transaction by wrapping it in ``COMMIT``
136
Make the dump of each table a single transaction by wrapping it in ``COMMIT``
139
139
.. option:: --no-create-db, -n
141
Do not dump the ``CREATE DATABASE`` statements when using
142
:option:`--all-databases` or :option:`--databases`.
141
Do not dump the ``CREATE DATABASE`` statements when using
142
:option:`--all-databases` or :option:`--databases`.
144
144
.. option:: --skip-create, -t
146
Do not dump the ``CREATE TABLE`` statements.
146
Do not dump the ``CREATE TABLE`` statements.
148
148
.. option:: --no-data, -d
150
Do not dump the data itself, used to dump the schemas only.
150
Do not dump the data itself, used to dump the schemas only.
152
152
.. option:: --replace
154
Use ``REPLACE INTO`` statements instead of ``INSERT INTO``
154
Use ``REPLACE INTO`` statements instead of ``INSERT INTO``
156
156
.. option:: --destination-type type (=stdout)
158
Destination of the data.
161
The default. Output to the command line
164
Connect to another database and pipe data to that.
166
.. versionadded:: 2010-09-27
158
Destination of the data.
161
The default. Output to the command line
164
Connect to another database and pipe data to that.
166
.. versionadded:: Drizzle7 2010-09-27
168
168
.. option:: --destination-host hostname (=localhost)
170
The hostname for the destination database. Requires
171
:option:`--destination-type` `= database`
170
The hostname for the destination database. Requires
171
:option:`--destination-type` `= database`
173
.. versionadded:: 2010-09-27
173
.. versionadded:: Drizzle7 2010-09-27
175
175
.. option:: --destination-port port (=3306)
177
The port number for the destination database. Requires
178
:option:`--destination-type` `= database`
177
The port number for the destination database. Requires
178
:option:`--destination-type` `= database`
180
.. versionadded:: 2010-09-27
180
.. versionadded:: Drizzle7 2010-09-27
182
182
.. option:: --destination-user username
184
The username for the destinations database. Requires
185
:option:`--destination-type` `= database`
184
The username for the destinations database. Requires
185
:option:`--destination-type` `= database`
187
.. versionadded:: 2010-09-27
187
.. versionadded:: Drizzle7 2010-09-27
189
189
.. option:: --destination-password password
191
The password for the destination database. Requires
192
:option:`--destination-type` `= database`
191
The password for the destination database. Requires
192
:option:`--destination-type` `= database`
194
.. versionadded:: 2010-09-27
194
.. versionadded:: Drizzle7 2010-09-27
196
196
.. option:: --destination-database database
198
The database for the destination database, for use when only dumping a
199
single database. Requires
200
:option:`--destination-type` `= database`
198
The database for the destination database, for use when only dumping a
199
single database. Requires
200
:option:`--destination-type` `= database`
202
.. versionadded:: 2010-09-27
202
.. versionadded:: Drizzle7 2010-09-27
204
204
.. option:: --my-data-is-mangled
206
If your data is UTF8 but has been stored in a latin1 table using a latin1
207
connection then corruption is likely and drizzledump by default will retrieve
208
mangled data. This is because MySQL will convert the data to UTF8 on the way
209
out to drizzledump and you effectively get a double-conversion to UTF8.
211
This typically happens with PHP apps that do not use ``SET NAMES``.
213
In these cases setting this option will retrieve the data as you see it in your
216
.. versionadded:: 2011-01-31
206
If your data is UTF8 but has been stored in a latin1 table using a latin1
207
connection then corruption is likely and drizzledump by default will retrieve
208
mangled data. This is because MySQL will convert the data to UTF8 on the way
209
out to drizzledump and you effectively get a double-conversion to UTF8.
211
This typically happens with PHP apps that do not use ``SET NAMES``.
213
In these cases setting this option will retrieve the data as you see it in
216
.. versionadded:: Drizzle7 2011-01-31
218
218
.. option:: --host, -h hostname (=localhost)
220
The hostname of the database server.
220
The hostname of the database server.
222
222
.. option:: --user, -u username
224
The username for the database server.
224
The username for the database server.
226
226
.. option:: --password, -P password
228
The password for the database server.
228
The password for the database server.
230
230
.. option:: --port, -p port (=4427)
232
The port number of the database server.
232
The port number of the database server.
234
234
.. option:: --protocol protocol (=mysql)
236
The protocol to use when connecting to the database server. Options are:
239
The standard MySQL protocol.
242
The Drizzle protocol.
236
The protocol to use when connecting to the database server. Options are:
239
The standard MySQL protocol.
242
The Drizzle protocol.
244
244
Backups using Drizzledump
245
245
-------------------------