Question

How can I downgrade my DB cluster

Hi, I was able to upgrade my DB cluster, but there is no option to downgrade it! I don’t understand why not. I can downgrade and upgrade my droplets whenever I want, but not my DB cluster? Is there a way to do this, other than backing up, destroying and creating a smaller DB cluster.

If there isn’t another way, then please help me with my case, only 2 days in the entire month do I need the additional DB memory and CPU, and honestly I do not wish to spend the extra $60 or even $90 a month, just for those two high season days, so what can I do to avoid paying more than I should.

Do read only nodes help me with this case? Assuming I have reconfigured my software, to distribute connections between primary and read-only node, for read statements, does this help me with my case, when the high season is over, I could just destroy the read only node.

Or is there a better option, cause’ honestly this solution sounds like a lot of work.

Thanks


Submit an answer


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!

Sign In or Sign Up to Answer

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.

Rajkishore J
DigitalOcean Employee
DigitalOcean Employee badge
September 22, 2021
Accepted Answer

Hi @ALKateb,

EDIT April 2023

As of the time being Managed Database Cluster cannot be resized to an instance with smaller disks.

The main reason why database nodes cannot be resized to smaller sizes is due to the risk of data loss. This is also valid for our Droplets as well.

To downgrade to a smaller instance you can follow the steps here:

  • Create a new Managed database cluster with the desired size
  • Migrate your data from the old large instance to the new small instance
  • Update your applications to use the new Managed database cluster
  • Check the database activity for your old large instance and only once you are certain that the instance is no longer used, can you go ahead and destroy it.

In the past, you could use the API to downgrade your instances as described bellow which is currently not the case.


At the moment Digitalocean does not support scaling down of a Managed database cluster from the UI, You can read about limitations here:

https://docs.digitalocean.com/products/databases/mysql/#limits

Alternatively, you can resize the database cluster to size your choice using DO API/DOCTL CLI.

DOCTL CLI:

https://docs.digitalocean.com/reference/doctl/reference/databases/resize/

doctl databases resize b1723184-32d7-41eb-8bb3-f911b6d9d449 --num-nodes 1 --size db-s-1vcpu-1gb

DO API:

https://developers.digitalocean.com/documentation/v2/#resize-a-database-cluster

Please note, there are 3 different slugs identifiers for machine type. You have to modify them according to your cluster resize slug size. For example

Basic Node :
{"size":"db-s-2vcpu-4gb", "num_nodes":1}

General Purpose Node :
{"size":"gd-4vcpu-16gb", "num_nodes":1}

Storage Optimized Node :
{"size":"so1_5-4vcpu-32gb", "num_nodes":1}
curl -X PUT -H "Content-Type: application/json" -H "Authorization: Bearer xxxxxx" -d '{"size":"gd-4vcpu-16gb", "num_nodes":1}' "https://api.digitalocean.com/v2/databases/{UUID}/resize"

I hope this helps!

Regards, Rajkishore

alexdo
Site Moderator
Site Moderator badge
March 11, 2023

Hello,

The best thing to do to get your voice heard regarding this would be to head over to our Product Ideas board and post a new idea, including as much information as possible for what you’d like to see implemented.

https://ideas.digitalocean.com/

Hope that helps!

WTH I’ve upgraded my db cluster temporary for a bigger job. Now I wanted to downgrade both instances to the original one and notice I cant do that.

So instead of 60 USD/Month, I now have to pay 500 USD/month.

Why is there no huge warning that this step can not be reverted from the UI?

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Become a contributor for community

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

DigitalOcean Documentation

Full documentation for every DigitalOcean product.

Resources for startups and SMBs

The Wave has everything you need to know about building a business, from raising funding to marketing your product.

Get our newsletter

Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.

New accounts only. By submitting your email you agree to our Privacy Policy

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.