Restore command used for restore backup file mysql -u root -p < c:\full_backup.sql delete-master-logs option deleting the binary logs that are no longer needed master-data option causes mysqldump to write binary log information to its output. flush-logs option causes the server to flush its logs. single-transaction uses a consistent read and guarantees that data seen by mysqldump does not change. Mysqldump -databases sales order > E:\dump.sql Mysqldump -u root -p -all-databases -master-data -single-transaction > E:\Full_backup.sql –Incremental backup is possible with help of binary logs, you need to rotate binary log at time of backup using FLUSH LOGS or mysqldump –flush-logs.Įxample of taking full logical backup InnoDB tables: - Take full backup of all database To get a consistent backup, stop the server or lock and flush the relevant tables: FLUSH TABLES tbl_list WITH READ LOCK –For MyISAM tables, perform backup by copying table files (*.MYD, *.MYI files, and associated *.sdi files). –For InnoDB tables, perform an online backup that takes no locks on tables using the –single-transaction option to mysqldump. Its generate output in forms of SQL scripts. Logical backup tools include the mysqldump program. Or file system-level commands (such as cp, scp, tar, rsync) for MyISAM tables. Physical backup tools include the mysqlbackup of MySQL Enterprise Backup for InnoDB or any other tables,
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |