1MARIADB-HOTCOPY(1)          MariaDB Database System         MARIADB-HOTCOPY(1)
2
3
4

NAME

6       mariadb-hotcopy - a database backup program (mysqlhotcopy is now a
7       symlink to mariadb-hotcopy)
8

SYNOPSIS

10       mysqlhotcopy arguments
11

DESCRIPTION

13       mysqlhotcopy is a Perl script that was originally written and
14       contributed by Tim Bunce. It uses FLUSH TABLES, LOCK TABLES, and cp or
15       scp to make a database backup. It is a fast way to make a backup of the
16       database or single tables, but it can be run only on the same machine
17       where the database directories are located.  mysqlhotcopy works only
18       for backing up MyISAM and ARCHIVE tables. It runs on Unix and NetWare.
19
20       To use mysqlhotcopy, you must have read access to the files for the
21       tables that you are backing up, the SELECT privilege for those tables,
22       the RELOAD privilege (to be able to execute FLUSH TABLES), and the LOCK
23       TABLES privilege (to be able to lock the tables).
24
25           shell> mysqlhotcopy db_name [/path/to/new_directory]
26
27           shell> mysqlhotcopy db_name_1 ... db_name_n /path/to/new_directory
28
29       Back up tables in the given database that match a regular expression:
30
31           shell> mysqlhotcopy db_name./regex/
32
33       The regular expression for the table name can be negated by prefixing
34       it with a tilde (“~”):
35
36           shell> mysqlhotcopy db_name./~regex/
37
38       mysqlhotcopy supports the following options, which can be specified on
39       the command line or in the [mysqlhotcopy] and [client] option file
40       groups.
41
42--help, -?
43
44           Display a help message and exit.
45
46--addtodest
47
48           Do not rename target directory (if it exists); merely add files to
49           it.
50
51--allowold
52
53           Do not abort if a target exists; rename it by adding an _old
54           suffix.
55
56--checkpoint=db_name.tbl_name
57
58           Insert checkpoint entries into the specified database db_name and
59           table tbl_name.
60
61--chroot=path
62
63           Base directory of the chroot jail in which mysqld operates. The
64           path value should match that of the --chroot option given to
65           mysqld.
66
67--debug
68
69           Enable debug output.
70
71--dryrun, -n
72
73           Report actions without performing them.
74
75--flushlog
76
77           Flush logs after all tables are locked.
78
79--host=host_name, -h host_name
80
81           The host name of the local host to use for making a TCP/IP
82           connection to the local server. By default, the connection is made
83           to localhost using a Unix socket file.
84
85--keepold
86
87           Do not delete previous (renamed) target when done.
88
89--method=command
90
91           The method for copying files (cp or scp). The default is cp.
92
93--noindices
94
95           Do not include full index files for MyISAM tables in the backup.
96           This makes the backup smaller and faster. The indexes for reloaded
97           tables can be reconstructed later with myisamchk -rq.
98
99--old-server
100
101           Connect to old MySQL-server (before v5.5) which doesn't have FLUSH
102           TABLES WITH READ LOCK fully implemented..
103
104--password=password, -ppassword
105
106           The password to use when connecting to the server. The password
107           value is not optional for this option, unlike for other MariaDB
108           programs.
109
110           Specifying a password on the command line should be considered
111           insecure. You can use an option file to avoid giving the password
112           on the command line.
113
114--port=port_num, -P port_num
115
116           The TCP/IP port number to use when connecting to the local server.
117
118--quiet, -q
119
120           Be silent except for errors.
121
122--record_log_pos=db_name.tbl_name
123
124           Record master and slave status in the specified database db_name
125           and table tbl_name.
126
127--regexp=expr
128
129           Copy all databases with names that match the given regular
130           expression.
131
132--resetmaster
133
134           Reset the binary log after locking all the tables.
135
136--resetslave
137
138           Reset the master.info file after locking all the tables.
139
140--socket=path, -S path
141
142           The Unix socket file to use for connections to localhost.
143
144--suffix=str
145
146           The suffix to use for names of copied databases.
147
148--tmpdir=path
149
150           The temporary directory. The default is /tmp.
151
152--user=user_name, -u user_name
153
154           The MariaDB user name to use when connecting to the server.
155
156       Use perldoc for additional mysqlhotcopy documentation, including
157       information about the structure of the tables needed for the
158       --checkpoint and --record_log_pos options:
159
160           shell> perldoc mysqlhotcopy
161
163       Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc.,
164       2010-2019 MariaDB Foundation
165
166       This documentation is free software; you can redistribute it and/or
167       modify it only under the terms of the GNU General Public License as
168       published by the Free Software Foundation; version 2 of the License.
169
170       This documentation is distributed in the hope that it will be useful,
171       but WITHOUT ANY WARRANTY; without even the implied warranty of
172       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
173       General Public License for more details.
174
175       You should have received a copy of the GNU General Public License along
176       with the program; if not, write to the Free Software Foundation, Inc.,
177       51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA or see
178       http://www.gnu.org/licenses/.
179
180

SEE ALSO

182       For more information, please refer to the MariaDB Knowledge Base,
183       available online at https://mariadb.com/kb/
184

AUTHOR

186       MariaDB Foundation (http://www.mariadb.org/).
187
188
189
190MariaDB 10.5                     27 June 2019               MARIADB-HOTCOPY(1)
Impressum