Physical backup is copying the data files that belongs to database. Logical backup is using SQL statements.
So physical or logical backup takes more space when backing up same MySQL database?
Mysql – Physical or logical backup takes more space when backing up same MySQL database
MySQL
Related Question
- Mysql – To make a LVM backup of a MySQL database, would I have to reduce the logical volume size
- Mysql – What permissions do you need to take a thesql database backup via SSH
- MySQL – How to Backup MyISAM Tables by Copying Physical Files and Automating the Process
- Mysql takes more tmp space than the table size
- MySQL – Recovering InnoDB Database from Full Physical Backup
- Mysql – How to hot-backup thesql slave database with read operations
- MySQL Backup – Creating a Disaster Recovery Plan
Best Answer
If you backup the files by copying the directory tree, the backup is the same size as the original.
If you use
mysqldump
(or similar tool) to backup, that will containCREATE
andINSERT
statements to recreate the database from scratch. This can be larger or smaller, depending on the data involved.An example of "smaller": a
BIGINT
takes 8 bytes in a table, but if the value is1
, it will take about 2 bytes in a logical dump (1
and a comma).