通过Terraform从现有的PostgreSQL DB创建PostgreSQL数据库 [英] Create a PostgreSQL DB from existing PostgreSQL DB through Terraform
问题描述
大家好,
我有一个存储一些数据的PostgreSQL数据库。现在我需要使用现有的Postgre SQL db通过Terraform创建一个新的PostgreSQL数据库。我找不到任何关于此的文件。你可以帮我解决这个问题。
I am having a PostgreSQL DB which stores some data . Now i need to create a new PostgreSQL DB using the existing Postgre SQL db through Terraform. I could not not find any documentation on this . Could you please help me on this.
在AWS中我们有一个terraform输入参数说"Snapshot_Identifier"其中表示" 指定是否从快照创建数据库强>" 跨度>。
同样,我们在Azure中有这样的论点吗?。
Like in AWS we have an terraform input argument saying "Snapshot_Identifier" which states "Specifies whether or not to create the database from a snapshot". Similarly do we have any argument in Azure like this ?.
先谢谢,
Sanjay
推荐答案
嗨Sanjay,
Hi Sanjay,
可以选择通过备份文件为PostgreSQL实例创建Azure数据库,但该备份文件必须用于以前部署为PostgreSQL实例的Azure数据库的PostgreSQL实例。您需要使用下面列出的复制
选项之一将PostgreSQL实例迁移到Azure。
There is an option to create an Azure Database for PostgreSQL instance via a backup file but that backup file must be for a PostgreSQL instance previously deployed as an Azure Database for PostgreSQL instance. You will need to use one of the replication options listed below to migrate a PostgreSQL instance to Azure.
目前,备份选项只允许您从以前的列表中进行选择备份文件。因为我没有,所以没有可供选择,但是,如果我有一个以前的备份文件,它将在这里列出:
Currently, the backup option only allows you to select from a list of previous backup files. Since I have none, there are none to select from but, in the case that I had a previous backup file it would be listed here:
迁移PostgreSQL数据库的一些选项:
A few options for migrating a PostgreSQL database:
< a href ="https://docs.microsoft.com/en-us/azure/postgresql/howto-migrate-online"target ="_ blank">最小停机时间迁移到Azure数据库for PostgreSQL
>
这篇关于通过Terraform从现有的PostgreSQL DB创建PostgreSQL数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!