I’m trying to run a migration and the process for an alter table command is locked with
show processlist giving its state as
Waiting for backup lock
The text seems kind of self explanatory, there must be a backup happening.
Unfortunately I can’t see anything in the control panel that refers to backups, such as what time they happen, logs of how long they take or anyway to be able to identify if one is happening.
How can I change when backups occur?
How can I know if a backup is running before attempting to run some code so I don’t hit this problem again?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Click below to sign up and get $200 of credit to try our products over 60 days!
Enter your email to get $200 in credit for your first 60 days with DigitalOcean.
To verify if this was indeed a backup, you can use the DigitalOcean API and send a GET request to
/v2/databases/$DATABASE_ID/backupswhich will return a list of your database backups and the time they were created:
What you could also do is to change your maintenance window by sending a PUT request to
Hope that this helps!