How to backup all database information using mysqldump?

I want not only the "Create a table" instructions, but also the "Insert". What flags should I pass to mysqldump?

In addition, the database is relatively large (2-2.5G). Obviously, I want the backup to be as fast as possible. Any flags that might help?

thank

+3
source share
3 answers

The command mysqldumpreturns the default data. A simple output mysqldump dbname > dumpwill result in a dump with the schema and data.

, --opt, , , , . --quick ( --opt) - , . --quick , .

, :

mysqldump --opt dbname | gzip - > dump
+5

.

, , , .

mysqldump [options] [db_name [tbl_name ...]]

,

--compact

,

--quick

, , man mysqldump.

+1

mysqldump, , ( , , ..)

mysqldump --help - , .

, , , ( ..). )

0

Source: https://habr.com/ru/post/1756514/


All Articles