InnoDB does not free up disk space; this is PITA. Basically, you can free it by dropping the database and restoring it from the backup (as you accidentally noticed) - see here for an example .
So, you cannot calculate how big the database will be after restoring the backup. But it will never be more than a backup (because the unused version still has space from any deleted data, and the restored backup will not have such space).
To some extent, this can be used using the file parameter for the table; in more detail in the first link from this publication.
El yobo
source share