Bug #50285 Pause option during backup, restore should be possible
Submitted: 12 Jan 2010 17:32 Modified: 15 Jan 2015 20:38
Reporter: Hema Sridharan Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Enterprise Backup Severity:S4 (Feature request)
Version: OS:Any
Assigned to: CPU Architecture:Any

[12 Jan 2010 17:32] Hema Sridharan
Description:
We need to have Pause option during backup and restore operation. This will help to pause the long running backup or restore operation and then resume in accordance to users convenience. 

This adds more flexibility to user for performing some other immediate server operations when backup / restore is going on.

How to repeat:
This is a feature request and is not currently implemented in MySQL backup.
[12 Jan 2010 17:35] Valeriy Kravchuk
Thank you for the feature request.
[20 Nov 2014 8:28] Daniël van Eeden
I recently encountered a situation where after a Ctrl-C during apply-log/uncompress I needed to do the following:
- Remove all uncompressed tables
- Update backup_variables.txt (change is_compressed from 0 to 1)

Solution:
- Change backup_variables.txt when all uncompress actions are finished, not when they start.
- Then on apply-log/uncompress detect not everything was uncompressed and uncompress again (hopefully start with the first not fully uncompressed table, if that's possible)
[10 Jan 2015 10:39] Daniël van Eeden
This status is set to 'Need Feedback'. What feedback is needed?
[15 Jan 2015 20:38] Sveta Smirnova
Daniel, you are right: status was wrong. Fixed!
[2 Apr 2015 7:58] Anandakumar S
Hi Daniel,

As per your actual statement in the bug,
The "pause" option during backup and to "resume" the backup later is not
possible with the format of the innodb redo log that we have as of now.
The time you resume backup, there are chances that the redo log got
overwritten with changes and MEB finds a gap in the lsn.

But the other issue that you mentioned is, when you perform ctrl-c during a
restore, the operation(uncompress/apply-log) need to be reverted..
Apply-log can be redone with --force option instead of reverting the
operation manually.

Please let us know your comment.
[5 Apr 2015 9:50] Daniël van Eeden
About the pause option:
That indeed makes sense. I do think this could be done, but then the server should be enhanced to meb could lock everything it needs (even w/ a new connection) and that would be too much effort as I don't think this is a very common senario. 

About the retry after ^C:
The force option sounds indeed like a good solution. Maybe the error messages could be enhanced to say: "If you get this error after aborting an earlier restore please use --force to..." or maybe meb could detect this situation and automatically do the right thing.

So I would propose to make it as easy as possible to retry a restore (after ^C, etc) and not do anything for pause/resume. But this is not my bug report, so maybe Hema Sridharan can comment on this also?