Skip to content

CLI restore of Azure SQL Database #9273

@vannovv

Description

@vannovv

This is autogenerated. Please review and update as needed.

Describe the bug

Command Name
az sql db restore

Errors:

Unable to build a model: Cannot deserialize datetime object., ValueError: Invalid datetime string: 2019-05-01T17-00Z, DeserializationError: Cannot deserialize datetime object., ValueError: Invalid datetime string: 2019-05-01T17-00Z
Traceback (most recent call last):
python3.7/site-packages/msrest/serialization.py, ln 1755, in deserialize_iso
    raise ValueError("Invalid datetime string: " + attr)
ValueError: Invalid datetime string: 2019-05-01T17-00Z

...

python3.7/site-packages/msrest/serialization.py, ln 1755, in deserialize_iso
    raise ValueError("Invalid datetime string: " + attr)
msrest.exceptions.SerializationError: Unable to build a model: Cannot deserialize datetime object., ValueError: Invalid datetime string: 2019-05-01T17-00Z, DeserializationError: Cannot deserialize datetime object., ValueError: Invalid datetime string: 2019-05-01T17-00Z

To Reproduce:

Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.

  • Put any pre-requisite steps here...
  • az sql db restore --dest-name {} --resource-group {} --server {} --name {} --time {}

Expected Behavior

For the database to be restored on a specified SQL Server.

Environment Summary

Darwin-18.5.0-x86_64-i386-64bit
Python 3.7.3
Shell: bash

azure-cli 2.0.63

Extensions:
application-insights 0.1.1

Additional Context

Have been able to manually walk through the restore using the portal. Want to figure out a way to automate the recovery of my databases in another region. For this test I grabbed the date/time from the available backup that showed up in the portal. I would also like to know if there is a way to determine from the CLI what the most recent backup time is so that I can use that in for my restore.

Metadata

Metadata

Assignees

Labels

SQLaz sqlService AttentionThis issue is responsible by Azure service team.needs-triageThis is a new issue that needs to be triaged to the appropriate team.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions