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
相關文章
- Using RMAN Incremental Backups to Refresh a Standby DatabaseREMDatabase
- Using RMAN Incremental Backups to Roll Forward a Physical Standby DatabaseREMForwardDatabase
- RMAN Fast Incremental BackupsASTREM
- Monitoring RMAN Backups
- mysqldumpMySql
- Making Whole Database Backups with RMANDatabase
- Rman Backups When The Directory Structures Are DifferentStruct
- Centos下_MysqL5.7在使用mysqldump命令備份資料庫報錯:mysqldump: [Warning] Using a password on the command line interface can be insecure.CentOSMySql資料庫
- 【mysqldump】mysqldump及備份恢復示例MySql
- mysqldump流程MySql
- mysqldump使用MySql
- mysqldump命令MySql
- Simple Automated Backups for MongoDB Replica SetsMongoDB
- HowTo Restore RMAN Disk backups of RACREST
- Description of restoring file and filegroup backups in SQL ServerRESTSQLServer
- mysqldump小談MySql
- mysqldump原理分析MySql
- mysqldump原理圖MySql
- 5.7 mysqldump routinesMySql
- MySQL mysqldump命令MySql
- mysqldump與mysqlpumpMySql
- mysqldump 選項MySql
- mysqldump 使用規範MySql
- mysqldump 深入淺出MySql
- Mysqldump引數大全MySql
- mysqldump簡單解析MySql
- mysqldump dump-slaveMySql
- 【MySql】mysqldump 的用法MySql
- MYSQLDUMP TABLE IN SQL FORMATMySqlORM
- mysqldump的基本用法MySql
- xtrabackup:error:streaming incremental backups are incompatible with the tarErrorREM
- 11G新特性 -- archival(long-term)backups
- Using index condition Using indexIndex
- mysqldump Got error: 1045MySqlGoError
- mysqldump備份技巧分享MySql
- MySQLDump的備份方法MySql
- mysqldump的最佳實踐MySql
- Mysqldump的備份流程MySql