Azure VM Backup Retaintion

Prachi D 60 Reputation points
2025-02-01T01:16:50.29+00:00

I have scheduled backup for my linux and windows vm which have backup policy that retain the backup for 7 days. I have backup taken on 30-Jan-2025 and I want to retain it for 30 days , but because of the policy it has retention period till 7 days only. What I can do to retain it for 30 days as I would need it after 30 days but it will not be present there after 7 days because of the policy.

If I decide to restore disks (instead of whole vm restore) from backup on 30-Jan and take snapshot of those disks and store them in the same resource group of vm will that works ? Also we need to mention storage account while restoring the disks what is use of that and will disks will be stored in storage account I am worried as we have total 10 disks that to of 500GB or more each so will it cost more if stored in storage account.

Pls give any other solutions that also we can use to restore vm backup on 30 jan even after 7 days.

Azure Backup
Azure Backup
An Azure backup service that provides built-in management at scale.
1,351 questions
{count} votes

Accepted answer
  1. Ashok Gandhi Kotnana 3,035 Reputation points Microsoft Vendor
    2025-02-03T06:45:15.77+00:00

    Hi @Prachi D,

    Welcome to Microsoft Q&A Forum, thank you for posting your query here!

    To retain your 30-Jan-2025 VM backup for 30 days despite the 7-day retention policy here are the approaches to follow.

    Q) From backup on 30-Jan and take snapshot of those disks and store them in the same resource group of vm will that works

    A) Yes, it will work for sure

    Solution 1: Create a new policy for this VM and set the retention period as needed? If the VM already has a dedicated policy, you can simply update the retention policy to your preferred value

    Solution 2: Restoring disks requires a storage account, but it won’t incur many costs. This is because the restore process only saves configuration data, not the actual disk data. See the screenshot below for reference.it is in KB

    User's image

    Note**:** When you do a restore disk it will create a Disk for that you will be charged.

    User's image

    Charge for Each Disk below screenshot: -

    User's imageVery Minimal for Snapshot CostUser's image Refer Cost for More information: https://azure.microsoft.com/en-us/pricing/details/managed-disks/?msockid=0598f210db7868723757e72eda2a6906

    Feel free to reach out if you have any further questions or need additional information—I’m happy to assist!

    Please provide your valuable comments User's image

    Please do not forget to "Accept the answer” and “upvote it” wherever the information provided helps you, this can be beneficial to other community members.it would be greatly appreciated and helpful to others.


1 additional answer

Sort by: Most helpful
  1. Marcin Policht 33,775 Reputation points MVP
    2025-02-01T01:26:49.92+00:00

    Here are a few options to try:

    Solution 1: Snapshot Disks and Store in a Storage Account

    1. Restoring Individual Disks and Creating Snapshots
      • You can restore individual disks from the backup on 30-Jan and take snapshots of those disks.
      • Snapshots allow you to capture the state of your disks at a given point in time, which you can retain for a longer period (e.g., 30 days). Snapshots are independent of the backup retention policy.
    2. Using Storage Account for Snapshots
      • While restoring disks, Azure might require specifying a storage account where the disk snapshots will reside. The snapshot will be stored as a specialized type of storage object, separate from the normal VM backup storage.
      • Storage Costs: Snapshots will incur costs based on the amount of data stored. The cost for 500GB disks would be based on the snapshot size and the duration of retention, but they will typically be cheaper than running the full VM.
      • For 10 disks of 500GB or more each, the storage costs could add up, but if your goal is to retain backups for 30 days, snapshots are a cost-effective solution compared to maintaining full backups.
    3. Steps for Creating Snapshots:
      • Restore disks from the backup.
      • Once the disks are restored, use the Azure portal or PowerShell to take snapshots of each disk.
             New-AzSnapshot -ResourceGroupName "yourResourceGroup" -SnapshotName "snapshotName" -SourceUri "yourDiskUri"
        
      • Store the snapshots in the same resource group or a different storage account (based on your cost considerations).
    4. Will It Work?
    • This method should work. You can restore disks, snapshot them, and retain those snapshots even after your backup policy expires.
      • Storage Account Use: It’s used to store the actual snapshot data. Depending on the amount of data and duration, it may incur some additional costs. However, snapshots are usually cheaper than full VM backups.

    Solution 2: Use Azure Backup Vault and Retention Settings

    1. Modify Retention Policy Temporarily
      • Azure Backup allows you to modify retention settings on an existing backup.
      • While your backup policy may retain backups for only 7 days, you could modify the retention period temporarily and extend the retention to 30 days.
        • If this change is possible, ensure it doesn’t disrupt other backups or policies.
    2. Consider Long-Term Retention (LTR)
      • If you expect to need a backup for long periods (more than 7 days), consider enabling Long-Term Retention (LTR) for your backups.
      • LTR is specifically designed to retain backups for extended periods, like months or even years. You could retain backups for 30 days using this feature, and you can apply this retention after 30-Jan to ensure the data remains available.

    Solution 3: Restore to a New Resource Group

    1. Restore and Retain VM in a New Resource Group
      • If you need to retain the backup but don't want to rely on the 7-day retention, you can restore the VM (or disks) to a new resource group on 30-Jan.
      • By restoring to a new resource group, the backup will exist independently of your original backup policy and retention settings.
    2. Storage Account Consideration:
      • When restoring disks, you might need to specify a storage account for the restored disks.
      • Costs: You would be charged based on the storage used by the disks and snapshots in the new resource group. So, if you have multiple 500GB disks, the cost will depend on the total size of the data being restored and stored in the storage account.

    If the above response helps answer your question, remember to "Accept Answer" so that others in the community facing similar issues can easily find the solution. Your contribution is highly appreciated.

    hth

    Marcin

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.