问题描述
我使用Firebase很长时间(自2018年起)并喜欢它.那时还没有南美洲东部地区(圣保罗).现在,我想将项目(Web应用程序,云功能和数据库)存储在南美,以降低成本并使之接近我的最终用户(同样位于巴西).
I am using Firebase for a long time (since 2018) and loving it. In that time there was not Location southamerica-east1 (São Paulo). Now I would like to store the project (web app, cloud function, and database) in southamerica to reduce cost and make it near to my end-users (also based in Brazil).
我具有源代码管理,所有环境参数值都存储在自定义环境变量"中.找不到数据时,该应用程序运行正常.无需担心备份数据.停机时间没有问题.这不是关键应用.
I have source control, all environment parameters values stored in Custom Environment Variables. The application works fine when no data is found. No concerns with backup data. No problem about downtime. This is not a critical app.
无论如何,我无法删除该应用程序,因为已经有一些用户登录那里,并且IoT设备通过PubSub发送数据.
Anyway, I can't delete the application because I already have some users logged in there and IoT devices sending data through PubSub.
- 如何从头开始重建Firebase/Firestore/Web应用程序/功能,并确保新位置在美国南部?如果可能的话,我需要保留用户名和密码以及网络
展望未来,(我认为在这里移动最佳位置不是最佳解决方案),但基于此页面为您的项目选择位置我无法更新位置,但是由于它是基于降级的位置,因此如果它不会破坏项目,我将使用Google Cloud Transfer Page来移动和重命名存储桶
Looking forward, (I don't think moving the bucked location would be the best solution here) but based on this page Select locations for your project I can't update the location, but since it is based on bucked location, if it doesn't break the project, I will use Google Cloud Transfer Page to Moving and renaming buckets
- 这可能比重建应用程序(Firebase/Firestore/Web应用程序/功能)更好的解决方案吗?
- 我可以破坏Firestore数据库或云功能或网络应用程序吗?
- 我可能会丢失项目域或任何其他相关的URL参数,例如authDomain,databaseURL,storageBucket吗?
- 更改后我是否需要更新一些Web应用程序参数?
推荐答案
根据您的信息,主要问题是 Firestore
,因为其他产品在全球范围内都很平衡,例如 Cloud IoT Core
>和 Hosting
(无法在特定区域上配置)
Based in your information, the main issue is Firestore
because other products are globally balanced like Cloud IoT Core
and Hosting
(these can't be configured on a specific region)
可以将具有相同代码和名称的其他产品(如功能)重新部署到另一个区域.
Other products like Functions can be redeployed with the same code and name into another region.
我认为您只能创建另一个项目,以仅将数据库移动到新区域并配置所有Cloud资源以到达新定位的数据库.
I think that you can create another project only to move the database to the new region and configure all Cloud resources to reach the new located database.
需要注意的是,您需要添加另一个域/子域并创建新的凭据才能使用新项目.无法跳过此步骤,因为它是身份验证所必需的.
As a caveat, you need to add another domain/subdomain and create new credentials to work with the new project; this step can´t be skipped because it is required for authentication.
在应用程序端,您可以添加对新数据库的访问权限
如果您在迁移过程中需要帮助,可以使用GCP/Firestore 开始案例支持.
In case you need assistance during your migration you can start a case with GCP/Firestore support.
这是一个很难解决的问题,但是也许迁移到另一个地区的成本和时间要比保持您的应用程序今天正常运行要高.
This is a hard pill to swallow, but maybe the costs and the time to migrate to another region will be higher than keeping your application as is working today.
这篇关于将Firebase项目移到另一个区域的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!