Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/azure-cli/azure/cli/command_modules/backup/custom.py
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,8 @@ def update_policy_for_item(cmd, client, resource_group_name, vault_name, item, p


def backup_now(cmd, client, resource_group_name, vault_name, item, retain_until):
if retain_until is None:
retain_until = (datetime.utcnow() + timedelta(days=30)).strftime('%d-%m-%Y')
Comment thread
sambitratha marked this conversation as resolved.
# Get container and item URIs
container_uri = _get_protection_container_uri_from_id(item.id)
item_uri = _get_protected_item_uri_from_id(item.id)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------------------------------

from datetime import datetime, timedelta
import azure.cli.command_modules.backup.custom_help as helper
# pylint: disable=import-error
# pylint: disable=unused-argument
Expand Down Expand Up @@ -85,6 +85,8 @@ def enable_for_AzureFileShare(cmd, client, resource_group_name, vault_name, afs_


def backup_now(cmd, client, resource_group_name, vault_name, item, retain_until):
if retain_until is None:
retain_until = (datetime.utcnow() + timedelta(days=30)).strftime('%d-%m-%Y')
container_uri = helper.get_protection_container_uri_from_id(item.id)
item_uri = helper.get_protected_item_uri_from_id(item.id)
trigger_backup_request = _get_backup_request(retain_until)
Expand Down