Bug #68390 Enterprise Backup requires 2x disk space of data dir to restore.
Submitted: 15 Feb 2013 15:35 Modified: 20 Aug 2013 11:19
Reporter: Michael Osinoski Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Enterprise Backup Severity:S4 (Feature request)
Version:3.9 OS:Linux (RHEL 5 & 6)
Assigned to: CPU Architecture:Any

[15 Feb 2013 15:35] Michael Osinoski
Description:
We are migrating from mysqldump to mysqlbackup.  With mysqldump we could stream backup to gzip and restore from the gzipped dump, with mysqlbackup it seems we need to completely uncompress the backup's mbi file to do a restore.  Many of our servers do not have this amount of diskspace available.  We need to be able to restore w/o completely expanding the mbi file.
We cannot restore a database that use more than approximately 45% of the disk, where as w/ mysqldump we could restore a database that used 80% of the disk.

How to repeat:
1. Create backup
bin/mysqlbackup -uroot -ppassword --port=3306 --compress --force --backup-dir=bu_dir  --backup-image=my_backup.mbi backup-to-image

2. restore backup
mysqlbackup --backup-image=my_backup.mbi --backup-dir=bu_dir   extract

mysqlbackup --defaults-file=/usr/local/mysql/etc/my.cnf --backup-dir=bu_dir --uncompress apply-log

mysqlbackup --defaults-file=/usr/local/mysql/etc/my.cnf --backup-dir=bu_dir --innodb-log-files-in-group=2 copy-back

Suggested fix:
Provide an option to restore without uncompressing backup.  
Ideally I would like to have the ability to restore from streamed source.  Currently I can restore from a gzip file, gpg file or across a ssh connection.
Or would it be possible to move the data files from mysqlbackup's temp dir to the data dir instead of copying them.
[11 Mar 2013 19:14] Sveta Smirnova
Thank you for the reasonable feature request.

You can gzip MEB backup: 

bin/mysqlbackup -uroot -ppassword --port=3306 --force --backup-dir=bu_dir  --backup-image=- backup-to-image | gzip --

But I agree you will need space at restore time still.
[20 Aug 2013 11:19] Jothir Ganesan
Currently, backup-to-image and backup-dir-to-image works as follows:
1. Image is created in a single file.
2. The contents of the image has to be extracted to a directory.
2a) Do Apply log if not done on backup dir 
3. Finally copy-back the extracted contents

These 3 steps can be reduced to 2:
1. Image/incremental image created in a single file.
2. Ability to copy-back directly from single file.

Also, directory backups can be restored in a single step with the help of 
copy-back-and-apply-log operation.

This feature is a performance improvement; it allows faster copy-back from image
files and requires less disk space during the command.
[20 Aug 2013 11:36] Jothir Ganesan
Fixed in MEB 3.9