Manage your Azure VM backups with Azure CLI 2.0 - Preview

We are excited to announce that you can now use Azure CLI to easily manage your Windows and Linux Azure VM backups using Azure Backup. With Azure Backup, you can backup Azure Windows and Linux VMs, VMs running on Premium storage, and on Managed Disks as well with application-consistency. Now with CLI support, take advantage of CLI features such as smart defaults for most common operations, tab completion and pipe-able outputs to simply and quickly manage your VM backup and recovery operations. Azure Backup is supported with Azure CLI 2.0 only and is currently in preview.

How CLI will help

Managing at scale: Easily handle operations at scale by including CLI commands in scripts and programs.

Automation:In conjunction with the command line tools, query on command outputs to identify important triggers and program subsequent actions. For example, backup health information can be programmatically retrieved, and subsequent operations can be initiated based on the health status.

Sample Scenarios:

Enabling Backup on a VM:

To protect a previously unprotected VMto a Recovery Services vault (within the same location and Resource group) with a default policy, use this command:

Management:

Now, just type the az backup item list command with the output in the table format (-o table) and view the backup status, health status and recommended actions to take, in case of backup failures, for all items within the vault.

The JSON output (-o json) gives more comprehensive information about the backup item and you can extract relevant details using command line tools.