Azure Arc Commands by Patrik

Azure Arc Data Services Commands

Create a Data Controller

az arcdata dc create --connectivity-mode Indirect --name arc-dc --namespace arcds `
    --azure-subscription $sub --resource-group ArcRes --location eastus ` 
    --profile azure-arc-kubeadm --use-k8s --storage-class local-storage

Check out the pods

kubectl get pods -n arcds

Create a managed instance

az SQL mi-arc create --name local-mi-01 --namespace arcds --use-k8s `
    --storage-class-data local-storage --storage-class-logs local-storage `
    --storage-class-datalogs local-storage --storage-class-backup local-storage

Restore DB

kubectl cp ..\AdvantureWorks2017.bak arcds/local-mi-01-0:var/opt/mssql/data/AdvantureWorks2017.bak -c arc-sqlmi

Export and upload metrics & logs

az arcdata dc export -t metrics --path metrics.json --namespace arcds --force
az arcdata dc export -t logs --path logs.json --namespace arcds --force

az arcdata dc upload --path metrics.json
az arcdata dc upload --path logs.json

Comments