'How can i edit and reduce gcloud SQL instance size (ssd storage)

As "Auto storage increase is enabled" was enabled on my instance along with "general logs ". due to which my instance crossed the storage of 5TB .but after clearing logs .space required by DBS is far lesser than the actual size of the instance.

How can i edit the size of instance to 2tb from 5 TB

Any help will be appreciated.



Solution 1:[1]

You basically can't.

You can always export your data, and import it to a new Cloud SQL instance with the right size.

EDIT:

There is a Feature Request in the Public Issue Tracker, but right now what I mentioned above is the only way to go.

Solution 2:[2]

It's impossible to reduce Instance size(Storage capacity) for all PostgreSQL, MySQL and SQL Server on Cloud SQL. Only increasing Instance size is possible.

But, if you really want to reduce Instance size from 5 TB to 2 TB on Cloud SQL, you can export the data from the existing instance :

enter image description here

And import the data into a new instance which you newly created with the Instance size 2 TB. This way, you can reduce Instance size from 5 TB to 2 TB on Cloud SQL:

enter image description here

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1
Solution 2 Kai - Kazuya Ito