az sql midb-arc

Note

This reference is part of the arcdata extension for the Azure CLI (version 2.3.1 or higher). The extension will automatically install the first time you run an az sql midb-arc command. Learn more about extensions.

Manage databases for Azure Arc-enabled SQL managed instances.

Commands

Name Description Type Status
az sql midb-arc restore

Restore a database to an Azure Arc enabled SQL managed instance.

Extension GA

az sql midb-arc restore

Restore a database to an Azure Arc enabled SQL managed instance.

az sql midb-arc restore [--dest-name]
                        [--dry-run]
                        [--k8s-namespace]
                        [--managed-instance]
                        [--name]
                        [--no-wait]
                        [--time]
                        [--use-k8s]

Examples

Ex 1 - Restore a database using Point in time restore.

az sql midb-arc restore --managed-instance sqlmi1 --name mysourcedb
 --dest-name mynewdb --time "2021-10-20T05:34:22Z" --k8s-namespace
 arc --use-k8s --dry-run

Optional Parameters

--dest-name

Name of the database that will be created as the restore destination.

--dry-run

Validates if the restore operation can be successful or not by returning earliest and latest restore time window.

--k8s-namespace -k

The Kubernetes namespace that contains the Azure Arc enabled SQL managed instance. If no namespace is specified, then the namespace defined in the kubeconfig will be used.

--managed-instance

Name of the source Azure Arc enabled SQL managed instance.

--name -n

Name of the source database from where the backups should be retrieved.

--no-wait

Do not wait for the long-running operation to finish.

--time -t

The point in time of the source database that will be restored to create the new database. Must be greater than or equal to the source database's earliest restore date/time value. Time should be in following format: 'YYYY-MM-DDTHH:MM:SSZ'. If no time is provided, the most recent backup will be restored.

--use-k8s

Use local Kubernetes APIs to perform this action.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.