Source
The mysqldump 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, mysqldump can also be used to generate files in CSV, other delimited text, or XML format.
If you are doing a backup on the server and your tables all are
MyISAM
tables, consider using the mysqlhotcopy instead because it can accomplish faster backups and faster restores. See Section 4.6.9, “mysqlhotcopy — A Database Backup Program”. There are three general ways to invoke mysqldump:
shell>mysqldump [
shell>options
]db_name
[tbl_name
...]mysqldump [
shell>options
] --databasesdb_name
...mysqldump [
options
] --all-databases
If you do not name any tables following
db_name
or if you use the --databases
or --all-databases
option, entire databases are dumped. mysqldump does not dump the
INFORMATION_SCHEMA
database by default. As of MySQL 5.1.38, mysqldump dumps INFORMATION_SCHEMA
if you name it explicitly on the command line, although you must also use the --skip-lock-tables
option. Before 5.1.38, mysqldump silently ignores INFORMATION_SCHEMA
even if you name it explicitly on the command line. In MySQL Cluster NDB 7.1.7 and later, the
ndbinfo
information database is ignored and not dumped by mysqldump. To see a list of the options your version of mysqldump supports, execute mysqldump --help.
No comments:
Post a Comment