Is there any way to tolerate MySQL restarts while xtrabackup in progress? like some wait time something that will not break the process.
Unfortunately there is no such thing. I am curious what is your use case for that?
use case is like, we have scripts which takes daily backups and if someone restarts MySQL without checking if backup in progress they may break the backup of that day.
A few things here:
-
That’s the job of the person restarting mysql. If you have that power, then it is your responsibility to make sure the restart won’t impact other operations.
-
Only the “DBA” should be able to restart MySQL, and the DBA should know about the backup process.
-
How often are you restarting MySQL? Most mysql servers have MONTHS of uptime. Restarting MySQL is not a common task and not something that needs to be happening daily, or even weekly. If you are doing this, then you are managing your MySQL incorrectly and/or have some other issue at hand that need to be fixed.
I agree with you, please ignore. Just wanted to check if there is a feature for it
I don’t know of any database system out there that can support backups through a restart. Most backup tools for any RDBMS need to maintain contact with the database itself to monitor/track changes and when you stop the database, you lose that. MySQL certainly supports backing up while being stopped, but not during a restart.