Using mysqldump for backups
7.4 Using mysqldump for backups
mysql 官網
感覺這個指令碼有點厲害
還有這個逼的部落格
a dump file used in several ways
- enable data recovery in case of data loss
- data for setting up replicas
- data for experimentations:
- use without changing the original data
- to test potential upgrade incompatibilities
7.4.1 dumping data in sql format whith mysqldump
mysqldump [arguments] > file_name
mysqldump --all-databases > dump.sql
mysqldump --databases db1 db2 db3 > dump.sql
–all-databases and --databases write create database and use statements
–add-drop-database write drop database statement
mysqldump test t1 t3 t7 > dump.sql
dump only specific tables from a database
any set @@global.gtid_purged statement in the second dump file fails.
to avoid this issue, either set option --set-gtid-purged ot off
or ccommented to output the second dump file whithout an active set @@global.gtid_purged statement,
or remove the statement manually before replaying the dump file
7.4.2 reloading sql-format bakups
mysql < dump.sql
or enter mysql
mysql shell > source dump.sql
7.4.5 mysqldump tips
中間有2小節我不想看,我不想用這個技術
7.4.5.1 making a copy of a database
mysqldump db1 > dump.sql
mysqladmin create db2
mysql db2 < dump.sql
不要使用 --databases sql 指令碼會有 use statement
7.4.5.2 copy a database from one server to Another
記得切換 ip
7.4.5.3 dumping stored programs
stored procedures and functions, triggers and events
- –events: event scheduler events
- –routines: stored procedures and functions
- –triggers: triggers for tables
disabled by default
7.4.5.4 dumping table definitions and content separately
mysqldump --no-data test > dump-defs.sql
mysqldump --no-create-info test > dump-data.sql
7.4.5.5 using mysqldump to test for upgrade or downgrade incompatibilities
proc
mysqldump --all-databases --no-data --routines --events > dump-defs.sql
looking for warnings or errors while the dump file is being processed
proc
mysqldump --all-databases --no-create-info > dump-data.sql
相關文章
- 【mysqldump】mysqldump及備份恢復示例MySql
- HowTo Restore RMAN Disk backups of RAC Database to Single Instance On Another NoRESTDatabase
- mysqldump原理分析MySql
- mysqldump小談MySql
- MySQL 索引優化 Using where, Using filesortMySql索引優化
- MySQL explain結果Extra中"Using Index"與"Using where; Using index"區別MySqlAIIndex
- mysqldump Got error: 1045MySqlGoError
- mysqldump Got error 1290MySqlGoError
- mysqldump 使用規範MySql
- mysqldump 深入淺出MySql
- mysqldump匯出報錯"mysqldump: Error 2013 ... during query when dumping tableMySqlError
- mysqldump: Error: Binlogging on server not activeMySqlErrorServer
- mysqldump備份技巧分享MySql
- Mysqldump的備份流程MySql
- MySQLDump的備份方法MySql
- mysqldump的最佳實踐MySql
- mysqldump引數說明MySql
- MYSQL-mysqldump學習MySql
- String interpolation using $
- using的用法
- Using hints for PostgresqlSQL
- MySQL 之 USINGMySql
- windows mysqldump備份指令碼WindowsMySql指令碼
- MySQL:MTS和mysqldump死鎖MySql
- MGTSC 212 using ExcelExcel
- Dictionary application using SwingAPP
- pdf crop using pythonPython
- What are the benefits of using an proxy?
- Video Division with using OpenCvIDEOpenCV
- 淺談Using filesort和Using temporary 為什麼這麼慢
- 簡單的mysqldump備份(windows)MySqlWindows
- mysql 大表mysqldump遷移方案MySql
- mysqldump 資料庫備份程式MySql資料庫
- mysqldump的內部實現原理MySql
- ARS Reinforcement Learning using Gymnasium
- Using MATLAB with CANoe 快讀Matlab
- RMAN之環境配置(二)---Backups to a Media Manager備份到介質管理器
- mysqldump從mysql遷移資料到OceanBaseMySql