Pages

Monday, 20 June 2016

Types of Backups - MySQL

1.Physical Backups :

backup consists of exact copies of database directories and files.
Physical backup methods are faster than logical because they onvolve only file copying.
In addition to databases,the backup can include any related files such as log or configuration files.
Backups are portable only to other machines that have identical or similar hardware characteristics.
Backups can be performed while the MySQL server is not running. if the server is running, it is necessary to perform appropriate locking.
Physical backup tolls include file system-level commands (such as cp,scp,tar,rsync),mysqlhotcopy for MyISAM tables,ibbackup for Innodb tables or START BACKUP for NDB tables.
Output is larger than for physical backup, particularly when saved in text format.

2.Logical backups :

The backup is done by querying the MySQL Server to obtain database structure and content information.
Backup is slower than physical methods because the server must access database information and convert it to logical format.
The backup does not include log or configuration files or other database-related files that are not part of database-related files that are not part of databases.
Backup stored in logical formats are machine independent and highly portable.
Logical backups are performed with the MySQL server running.
Logical backup tools include the mysqldump program and the SELECT … INTO OUTFILE statement.
To restore logical backups we use the MySQL import client. To load delimited-text files use the LOAD DATA INFILE statement.

No comments:

Post a Comment