Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
target_server_type_help = """Specify the type of the server which should be discovered."""
protectable_item_name_type_help = """Specify the resource name to be protected by Azure Backup service."""
backup_type_help = """'Full, Differential, Log, Copy-only-full' for backup Item type 'MSSQL'. 'Full, Differential' for backup item type 'SAPHANA'."""
retain_until_help = """The date until which this backed up copy will be available for retrieval, in UTC (d-m-Y). For SAPHANA and SQL workload, retain-until parameter value will be overridden by the underlying policy."""
retain_until_help = """The date until which this backed up copy will be available for retrieval, in UTC (d-m-Y). If not specified, 30 days will be taken as default value. For SAPHANA and SQL workload, retain-until parameter value will be overridden by the underlying policy."""
diskslist_help = """List of disks to be excluded or included."""
disk_list_setting_help = """option to decide whether to include or exclude the disk or reset any previous settings to default behavior"""
target_container_name_help = """The target container to which the DB recovery point should be downloaded as files."""
Expand Down
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