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.
Enter your email to get $200 in credit for your first 60 days with DigitalOcean.
New accounts only. By submitting your email you agree to our Privacy Policy.
Hi there,
To verify if this was indeed a backup, you can use the DigitalOcean API and send a GET request to
/v2/databases/$DATABASE_ID/backups
which will return a list of your database backups and the time they were created:https://docs.digitalocean.com/reference/api/api-reference/#operation/databases_list_backups
What you could also do is to change your maintenance window by sending a PUT request to
/v2/databases/$DATABASE_ID/maintenance
:https://docs.digitalocean.com/reference/api/api-reference/#operation/databases_update_firewall_rules
Hope that this helps!
Best,
Bobby