Is there a way to find out how much space mysqldump will need?

Is there a way to find out how much disk space is required for the output mysqldump

?

This is to ensure that the target disk for output has "sufficient space" before the actual call mysqldump

+3


source to share


1 answer


If you are using some unix flavor (linux, * bsd, etc.) you can use the command du -h

to check the size of the MySQL database directory you want to dump. This should give you an idea of ​​how much space the dump will need, the dump will be less than the space used by the database



On my CentOS 7 container, MySQL databases live in /var/lib/mysql

, something like du -hc /var/lib/mysql/somedb

should work

0


source







All Articles