如何减小Google Cloud SQL实例的大小? [英] How to reduce Google Cloud SQL instance size?

查看:84
本文介绍了如何减小Google Cloud SQL实例的大小?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Google Cloud SQL MySQL第二代5.7实例,其中有70GB的未使用存储空间.我想减少实例的未使用存储空间,因为这是主要的托管成本之一.

I have a Google Cloud SQL MySQL 2nd Gen 5.7 instance with 70GB of unused storage. I want to reduce the unused storage of my instance as this is one of the major hosting costs.

我唯一有可能的方法是将所有数据库转储到具有正确存储容量的新Google Cloud SQL实例中.但是,这种方法有几个陷阱:

The only way that I'm seeing as a possibility is dumping all the database to a new Google Cloud SQL instance created with the right storage capacity. However this approach has several pitfalls:

  • 转储和加载数据库将需要大量时间(这将在使用db的网站中造成严重的停机)
  • 我将不得不更改所有使用该数据库的网站,因为数据库的IP将会更改

我有什么选择?

推荐答案

As it is indicated in the official documentation, it is not possible to reduce the storage capacity of a Cloud SQL instance. You can give more capacity to an instance if needed, but the change is permanent and cannot be rolled back.

您现在最好的选择是创建一个导入SQL转储文件,以便将所有数据存储在新实例中.为了减少此过程的时间和成本,请遵循以下最佳做法,包括使用适当的标志,压缩数据和其他提示,以实现更快,更便宜的进出口.

The best option for you right now would be to create a SQL dump file and export your current data into it. Then, in a new Cloud SQL instance with the desired capacity, import the SQL dump file so that all your data is stored in the new instance. To reduce time and costs for this process, please follow these best practices, including the use of the appropriate flags, compressing your data and other tips available for faster and less expensive imports and exports.

但是,作为一项新功能被要求<,目前正在处理中.转到该链接,然后单击左上角的星形图标,以获取有关此请求所取得的任何进展的电子邮件通知.

However, the possibility of reducing the capacity of a Cloud SQL instance has been requested as a new feature and is currently being worked on. Head to the link and click on the star icon on the top left corner to get email notifications on any progress made on this request.

这篇关于如何减小Google Cloud SQL实例的大小?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆