az postgres server-arc
注意
此參考是 Azure CLI 的 arcdata 延伸模組的一部分 (2.3.1 版或更高版本)。 擴充功能會在您第一次執行 az postgres server-arc 命令時自動安裝。 深入了解擴充功能。
此命令群組處於預覽狀態,且正在開發中。 參考和支援層級: https://aka.ms/CLI_refstatus
管理已啟用 Azure Arc 的 PostgreSQL 伺服器。
命令
名稱 | Description | 類型 | 狀態 |
---|---|---|---|
az postgres server-arc create |
建立已啟用 Azure Arc 的 PostgreSQL 伺服器。 |
擴充 | 預覽版 |
az postgres server-arc delete |
刪除已啟用 Azure Arc 的 PostgreSQL 伺服器。 |
擴充 | 預覽版 |
az postgres server-arc endpoint |
管理已啟用 Azure Arc 的 PostgreSQL 伺服器端點。 |
擴充 | 預覽版 |
az postgres server-arc endpoint list |
列出已啟用 Azure Arc 的 PostgreSQL 伺服器端點。 |
擴充 | 預覽版 |
az postgres server-arc list |
列出已啟用 Azure Arc 的 PostgreSQL 伺服器。 |
擴充 | 預覽版 |
az postgres server-arc restore |
從另一部伺服器的備份還原已啟用 Azure Arc 的 PostgreSQL 伺服器。 |
擴充 | 預覽版 |
az postgres server-arc show |
顯示已啟用 Azure Arc 的 PostgreSQL 伺服器詳細資料。 |
擴充 | 預覽版 |
az postgres server-arc update |
更新已啟用 Azure Arc 的 PostgreSQL 伺服器的組態。 |
擴充 | 預覽版 |
az postgres server-arc create
命令群組 'postgres server-arc' 處於預覽狀態,且正在開發中。 參考和支援層級: https://aka.ms/CLI_refstatus
建立已啟用 Azure Arc 的 PostgreSQL 伺服器。
若要設定伺服器的密碼,請設定環境變數AZDATA_PASSWORD。
az postgres server-arc create --name
[--ad-account-name]
[--ad-connector-name]
[--admin-login-secret]
[--cert-private-key-file]
[--cert-public-key-file]
[--cores-limit]
[--cores-request]
[--dev]
[--dns-name]
[--extensions]
[--k8s-namespace]
[--keytab-secret]
[--log-level]
[--memory-limit]
[--memory-request]
[--no-external-endpoint]
[--no-wait]
[--path]
[--port]
[--retention-days]
[--service-annotations]
[--service-cert-secret]
[--service-labels]
[--service-type]
[--storage-class-backups]
[--storage-class-data]
[--storage-class-logs]
[--use-k8s]
[--volume-size-backups]
[--volume-size-data]
[--volume-size-logs]
範例
建立已啟用 Azure Arc 的 PostgreSQL 伺服器。
az postgres server-arc create -n pg1 --k8s-namespace namespace --use-k8s
必要參數
已啟用 Azure Arc 的 PostgreSQL 伺服器名稱。
選擇性參數
此已啟用 Azure Arc 的 PostgreSQL 伺服器的 Active Directory 帳戶名稱。 此帳戶必須在部署此實例之前建立。
Active Directory 連線or 的名稱。 此參數表示使用 AD 支援進行部署的意圖。
產生該主機的 Kubernetes 秘密名稱,或將裝載使用者管理員登入帳號憑證。
檔案的路徑,其中包含要用於用戶端 SSL 連線的 PEM 格式化憑證私密金鑰。
檔案的路徑,其中包含要用於用戶端 SSL 連線的 PEM 格式化憑證公開金鑰。
可用於已啟用 Azure Arc 的 PostgreSQL 伺服器的最大 CPU 核心數目。
每個節點必須可用的 CPU 核心數目下限,才能排程服務。
如果指定此專案,則會將其視為開發實例,且不會收取費用。
公開給終端使用者的服務 DNS 名稱,以連線到已啟用 Azure Arc 的 PostgreSQL 伺服器(例如 pginstancename.contoso.com)。
要啟用的延伸模組逗號分隔清單。 啟用之後,即可透過 'CREATE EXTENSION' 命令安裝擴充功能。
部署已啟用 Azure Arc 的 PostgreSQL 伺服器的 Kubernetes 命名空間。 如果未指定任何命名空間,則會使用 kubeconfig 中定義的命名空間。
Kubernetes 秘密的名稱,其中包含此已啟用 Azure Arc 之 PostgreSQL 伺服器的 keytab 檔案。
設定 PostgreSQL 引擎的log_min_messages設定。 有效值為:DEBUG5、DEBUG4、DEBUG3、DEBUG2、DEBUG1、INFO、NOTICE、WARNING、ERROR、LOG、FATAL、PANIC。
已啟用 Azure Arc 的 PostgreSQL 伺服器的記憶體限制,其為數字,後面接著 Ki (KB)、Mi (MB)或 Gi(GB)。
已啟用 Azure Arc 的 PostgreSQL 伺服器的記憶體要求,後面接著 Ki(KB)、Mi(MB)或 Gi(GB)。
如果指定,將不會建立任何外部服務。 否則,將會使用具有 --service-type 引數的型別或與資料控制站相同的服務類型來建立外部服務。
在傳回之前,請勿等待部署準備就緒。
已啟用 Azure Arc 之 PostgreSQL 伺服器的來源 json 檔案路徑。 這是選擇性。
主要服務公開給終端使用者的埠號碼。
備份保留期限,以天為單位指定。 允許的值為 0 到 35。 預設值為 7。 將保留期限設定為 0 將會關閉已啟用 Azure Arc 的 PostgreSql 自動備份。
要套用至所有外部服務的以逗號分隔的批註清單。
產生 SSL 憑證的 Kubernetes 秘密名稱。
要套用至所有外部服務的標籤逗號分隔清單。
主要服務的型別。
要用於備份永續性磁片區的儲存體類別。
要用於資料永續性磁片區的儲存體類別。
要用於記錄永續性磁片區的儲存體類別。
使用本機 Kubernetes API 來執行此動作。
要用於備份的儲存體磁片區大小為正數,後面接著 Ki (KB)、Mi (MB)或 Gi (GB)。
要作為正數的資料使用的儲存磁片區大小,後面接著 Ki (KB)、Mi (MB)或 Gi (GB)。
要用於記錄的儲存體磁片區大小為正數,後面接著 Ki (KB)、Mi (MB)或 Gi (GB)。
全域參數
增加記錄詳細資訊,以顯示所有偵錯記錄。
顯示此說明訊息並結束。
只顯示錯誤,隱藏警告。
輸出格式。
JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/。
訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID
帳戶。
增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。
az postgres server-arc delete
命令群組 'postgres server-arc' 處於預覽狀態,且正在開發中。 參考和支援層級: https://aka.ms/CLI_refstatus
刪除已啟用 Azure Arc 的 PostgreSQL 伺服器。
az postgres server-arc delete --name
[--force]
[--k8s-namespace]
[--use-k8s]
範例
刪除已啟用 Azure Arc 的 PostgreSQL 伺服器。
az postgres server-arc delete -n pg1 --k8s-namespace namespace --use-k8s
必要參數
已啟用 Azure Arc 的 PostgreSQL 伺服器名稱。
選擇性參數
刪除已啟用 Azure Arc 的 PostgreSQL 伺服器,而不需確認。
部署已啟用 Azure Arc 的 PostgreSQL 伺服器的 Kubernetes 命名空間。 如果未指定任何命名空間,則會使用 kubeconfig 中定義的命名空間。
使用本機 Kubernetes API 來執行此動作。
全域參數
增加記錄詳細資訊,以顯示所有偵錯記錄。
顯示此說明訊息並結束。
只顯示錯誤,隱藏警告。
輸出格式。
JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/。
訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID
帳戶。
增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。
az postgres server-arc list
命令群組 'postgres server-arc' 處於預覽狀態,且正在開發中。 參考和支援層級: https://aka.ms/CLI_refstatus
列出已啟用 Azure Arc 的 PostgreSQL 伺服器。
az postgres server-arc list [--k8s-namespace]
[--use-k8s]
範例
列出已啟用 Azure Arc 的 PostgreSQL 伺服器。
az postgres server-arc list --k8s-namespace namespace --use-k8s
選擇性參數
部署已啟用 Azure Arc 的 PostgreSQL 伺服器的 Kubernetes 命名空間。 如果未指定任何命名空間,則會使用 kubeconfig 中定義的命名空間。
使用本機 Kubernetes API 來執行此動作。
全域參數
增加記錄詳細資訊,以顯示所有偵錯記錄。
顯示此說明訊息並結束。
只顯示錯誤,隱藏警告。
輸出格式。
JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/。
訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID
帳戶。
增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。
az postgres server-arc restore
命令群組 'postgres server-arc' 處於預覽狀態,且正在開發中。 參考和支援層級: https://aka.ms/CLI_refstatus
從另一部伺服器的備份還原已啟用 Azure Arc 的 PostgreSQL 伺服器。
若要設定伺服器的密碼,請設定環境變數AZDATA_PASSWORD。
az postgres server-arc restore --k8s-namespace
--name
--source-server
[--dry-run]
[--no-wait]
[--storage-class-backups]
[--storage-class-data]
[--storage-class-logs]
[--time]
[--use-k8s]
[--volume-size-backups]
[--volume-size-data]
[--volume-size-logs]
範例
還原已啟用 Azure Arc 的 PostgreSQL 伺服器。
az postgres server-arc restore -n <to-pg> --source-server <from-pg> --k8s-namespace namespace --use-k8s
必要參數
包含已啟用 Azure Arc 的 PostgreSql 的 Kubernetes 命名空間。 如果未指定任何命名空間,則會使用 kubeconfig 中定義的命名空間。
要建立的已啟用 Azure Arc 的 PostgreSQL 伺服器名稱。
要從中還原的 Azure Arc 已啟用 PostgreSQL 伺服器的名稱。
選擇性參數
如果已設定,則會驗證來源和目的地資源和時間,而不執行還原。 最早和最新的可能還原時間會以還原工作的狀態傳回。
在傳回之前,請勿等待部署準備就緒。
要用於備份永續性磁片區的儲存體類別。
要用於資料永續性磁片區的儲存體類別。
要用於記錄永續性磁片區的儲存體類別。
將還原的來源伺服器時間點,以建立已啟用 Azure Arc 的新 PostgreSQL 伺服器。 必須大於或等於源資料庫的最早還原日期/時間值。 時間的格式應如下:'YYYY-MM-DDTHH:MM:SSZ'。 如果未提供任何時間,則會還原最新的備份。
使用本機 Kubernetes API 來執行此動作。
要用於備份的儲存體磁片區大小為正數,後面接著 Ki (KB)、Mi (MB)或 Gi (GB)。
要作為正數的資料使用的儲存磁片區大小,後面接著 Ki (KB)、Mi (MB)或 Gi (GB)。
要用於記錄的儲存體磁片區大小為正數,後面接著 Ki (KB)、Mi (MB)或 Gi (GB)。
全域參數
增加記錄詳細資訊,以顯示所有偵錯記錄。
顯示此說明訊息並結束。
只顯示錯誤,隱藏警告。
輸出格式。
JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/。
訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID
帳戶。
增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。
az postgres server-arc show
命令群組 'postgres server-arc' 處於預覽狀態,且正在開發中。 參考和支援層級: https://aka.ms/CLI_refstatus
顯示已啟用 Azure Arc 的 PostgreSQL 伺服器詳細資料。
az postgres server-arc show --name
[--k8s-namespace]
[--path]
[--use-k8s]
範例
顯示已啟用 Azure Arc 的 PostgreSQL 伺服器詳細資料。
az postgres server-arc show -n pg1 --k8s-namespace namespace --use-k8s
必要參數
已啟用 Azure Arc 的 PostgreSQL 伺服器名稱。
選擇性參數
部署已啟用 Azure Arc 的 PostgreSQL 伺服器的 Kubernetes 命名空間。 如果未指定任何命名空間,則會使用 kubeconfig 中定義的命名空間。
應撰寫已啟用 Azure Arc 之 PostgreSQL 伺服器的完整規格路徑。 如果省略,則會將規格寫入標準輸出。
使用本機 Kubernetes API 來執行此動作。
全域參數
增加記錄詳細資訊,以顯示所有偵錯記錄。
顯示此說明訊息並結束。
只顯示錯誤,隱藏警告。
輸出格式。
JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/。
訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID
帳戶。
增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。
az postgres server-arc update
命令群組 'postgres server-arc' 處於預覽狀態,且正在開發中。 參考和支援層級: https://aka.ms/CLI_refstatus
更新已啟用 Azure Arc 的 PostgreSQL 伺服器的組態。
az postgres server-arc update --name
[--cert-private-key-file]
[--cert-public-key-file]
[--cores-limit]
[--cores-request]
[--dev]
[--extensions]
[--k8s-namespace]
[--keytab-secret]
[--log-level]
[--memory-limit]
[--memory-request]
[--no-external-endpoint]
[--no-wait]
[--path]
[--port]
[--retention-days]
[--service-annotations]
[--service-cert-secret]
[--service-labels]
[--service-type]
[--use-k8s]
範例
更新已啟用 Azure Arc 的 PostgreSQL 伺服器的組態。
az postgres server-arc update --path ./spec.json -n pg1 --k8s-namespace namespace --use-k8s
為已啟用 Azure Arc 的現有 PostgreSQL 伺服器啟用擴充功能。
az postgres server-arc update -n pg1 --extensions 'pgaudit,pg_partman' --k8s-namespace namespace --use-k8s
從已啟用 Azure Arc 的 PostgreSQL 伺服器中移除擴充功能。
az postgres server-arc update -n pg1 --extensions "''" --k8s-namespace namespace --use-k8s
必要參數
正在更新之已啟用 Azure Arc 的 PostgreSQL 伺服器名稱。 無法變更部署實例的名稱。
選擇性參數
檔案的路徑,其中包含要用於用戶端 SSL 連線的 PEM 格式化憑證私密金鑰。
檔案的路徑,其中包含要用於用戶端 SSL 連線的 PEM 格式化憑證公開金鑰。
已啟用 Azure Arc 的 PostgreSQL 伺服器的最大 CPU 核心數目,可供每個節點使用。 若要移除cores_limit,請將其值指定為空字串。
每個節點必須可用的 CPU 核心數目下限,才能排程服務。 若要移除cores_request,請將其值指定為空字串。
如果指定此專案,則會將其視為開發實例,且不會收取費用。
要啟用的延伸模組逗號分隔清單。 若要新增或移除新的擴充功能,請更新現有的擴充功能清單。 啟用之後,即可透過 'CREATE EXTENSION' 命令安裝擴充功能。
部署已啟用 Azure Arc 的 PostgreSQL 伺服器的 Kubernetes 命名空間。 如果未指定任何命名空間,則會使用 kubeconfig 中定義的命名空間。
Kubernetes 秘密的名稱,其中包含此已啟用 Azure Arc 之 PostgreSQL 伺服器的 keytab 檔案。
設定 PostgreSQL 引擎的log_min_messages設定。 有效值為:DEBUG5、DEBUG4、DEBUG3、DEBUG2、DEBUG1、INFO、NOTICE、WARNING、ERROR、LOG、FATAL、PANIC。
已啟用 Azure Arc 的 PostgreSQL 伺服器的記憶體限制,後面接著 Ki (KB)、Mi (MB)或 Gi (GB)。 若要移除memory_limit,請將其值指定為空字串。
已啟用 Azure Arc 的 PostgreSQL 伺服器的記憶體要求,後面接著 Ki (KB)、Mi (MB)或 Gi (GB)。 若要移除memory_request,請將其值指定為空字串。
如果指定,將不會建立任何外部服務。 否則,將會使用具有 --service-type 引數的型別或與資料控制站相同的服務類型來建立外部服務。
在傳回之前,請勿等待部署準備就緒。
已啟用 Azure Arc 之 PostgreSQL 伺服器的來源 json 檔案路徑。 這是選擇性。
主要服務公開給終端使用者的埠號碼。
備份保留期限,以天為單位指定。 允許的值為 0 到 35。 預設值為 7。 將保留期限設定為 0 將會關閉已啟用 Azure Arc 的 PostgreSql 自動備份。
要套用至所有外部服務的以逗號分隔的批註清單。
產生 SSL 憑證的 Kubernetes 秘密名稱。
要套用至所有外部服務的標籤逗號分隔清單。
主要服務的型別。
使用本機 Kubernetes API 來執行此動作。
全域參數
增加記錄詳細資訊,以顯示所有偵錯記錄。
顯示此說明訊息並結束。
只顯示錯誤,隱藏警告。
輸出格式。
JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/。
訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID
帳戶。
增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。