使用 Azure 入口網站備份多部虛擬機器Use Azure portal to back up multiple virtual machines

當您使用 Azure 備份資料時,該資料會儲存在稱為復原服務保存庫的 Azure 資源中。When you back up data in Azure, you store that data in an Azure resource called a Recovery Services vault. 大部分 Azure 服務的 [設定] 功能表都提供復原服務保存庫資源。The Recovery Services vault resource is available from the Settings menu of most Azure services. 將復原服務保存庫整合至大部分 Azure 服務 [設定] 功能表的好處是,備份資料變得很容易。The benefit of having the Recovery Services vault integrated into the Settings menu of most Azure services makes it very easy to back up data. 不過,個別處理您企業中的每個資料庫或虛擬機器實在很費時。However, individually working with each database or virtual machine in your business is tedious. 如果想要將所有虛擬機器的資料備份在一個部門或一個位置,該怎麼辦?What if you want to back up the data for all virtual machines in one department, or in one location? 只要建立備份原則,並將該原則套用至所要的虛擬機器,即可輕鬆備份多部虛擬機器。It is easy to back up multiple virtual machines by creating a backup policy and applying that policy to the desired virtual machines. 本教學課程說明如何:This tutorial explains how to:

  • 建立復原服務保存庫Create a Recovery Services vault
  • 定義備份原則Define a backup policy
  • 套用備份原則以保護多部虛擬機器Apply the backup policy to protect multiple virtual machines
  • 觸發受保護虛擬機器的隨選備份作業Trigger an on-demand backup job for the protected virtual machines

登入 Azure 入口網站Log in to the Azure portal

登入 Azure 入口網站Log in to the Azure portal.

建立復原服務保存庫Create a Recovery Services vault

復原服務保存庫包含備份資料,以及套用至受保護虛擬機器的備份原則。The Recovery Services vault contains the backup data, and the backup policy applied to the protected virtual machines. 備份虛擬機器是本機的程序。Backing up virtual machines is a local process. 您無法將某個位置的虛擬機器備份到另一個位置的復原服務保存庫。You cannot back up a virtual machine from one location to a Recovery Services vault in another location. 因此,對於每個具有要備份之虛擬機器的 Azure 位置,該位置至少必須有一個復原服務保存庫。So, for each Azure location that has virtual machines to be backed up, at least one Recovery Services vault must exist in that location.

  1. 在左側功能表中,選取 [所有服務],然後在服務清單中鍵入復原服務On the left-hand menu, select All services and in the services list, type Recovery Services. 當您輸入時,會一邊篩選資源清單。As you type, the list of resources filters. 當您在清單中看到復原服務保存庫時,選取它以開啟 [復原服務保存庫] 功能表。When you see Recovery Services vaults in the list, select it to open the Recovery Services vaults menu.

    開啟 [復原服務保存庫] 功能表

  2. 在 [復原服務保存庫] 功能表中,按一下 [新增] 開啟 [復原服務保存庫] 功能表。In the Recovery Services vaults menu, click Add to open the Recovery Services vault menu.

    開啟保存庫功能表

  3. 在 [復原服務保存庫] 功能表中,In the Recovery Services vault menu,

    • 在 [名稱] 中鍵入 myRecoveryServicesVaultType myRecoveryServicesVault in Name.
    • 目前的訂用帳戶識別碼會出現在 [訂用帳戶] 中。The current subscription ID appears in Subscription. 如果您有其他的訂用帳戶,可為新的保存庫選擇其他訂用帳戶。If you have additional subscriptions, you could choose another subscription for the new vault.
    • 針對資源群組:選取 [使用現有] 並選擇 [myResourceGroup]。For Resource group select Use existing and choose myResourceGroup. 如果 [myResourceGroup] 不存在,請選取 [新建] 並鍵入 myResourceGroupIf myResourceGroup doesn't exist, select Create new and type myResourceGroup.
    • 從 [位置] 下拉式功能表中,選擇 [西歐]。From the Location drop-down menu, choose West Europe.
    • 按一下 [建立] 建立您的復原服務保存庫。Click Create to create your Recovery Services vault.

復原服務保存庫必須和受保護的虛擬機器位在相同地區。A Recovery Services vault must be in the same location as the virtual machines being protected. 如果您在多個區域中有虛擬機器,請在每個區域中建立復原服務保存庫。If you have virtual machines in multiple regions, create a Recovery Services vault in each region. 本教學課程會在「西歐」建立復原服務保存庫,因為這是 myVM (使用快速入門步驟建立之虛擬機器) 的建立位置。This tutorial creates a Recovery Services vault in West Europe because that is where myVM (the virtual machine created with the quickstart) was created.

建立復原服務保存庫可能需要一些時間。It can take several minutes for the Recovery Services vault to be created. 請監視入口網站右上方區域中的狀態通知。Monitor the status notifications in the upper right-hand area of the portal. 保存庫一旦建立好,就會出現在 [復原服務保存庫] 的清單中。Once your vault is created, it appears in the list of Recovery Services vaults.

當您建立復原服務保存庫時,根據預設,保存庫有異地備援儲存體。When you create a Recovery Services vault, by default the vault has geo-redundant storage. 為提供資料復原功能,異地備援儲存體會跨越兩個 Azure 區域多次複寫資料。To provide data resiliency, geo-redundant storage replicates the data multiple times across two Azure regions.

設定備份原則以保護 VMSet backup policy to protect VMs

建立復原服務保存庫之後,下一個步驟是針對資料類型設定保存庫,並設定備份原則。After creating the Recovery Services vault, the next step is to configure the vault for the type of data, and to set the backup policy. 備份原則是復原點擷取頻率和時間的排程。Backup policy is the schedule for how often and when recovery points are taken. 原則也會包含復原點的保留範圍。Policy also includes the retention range for the recovery points. 本教學課程假設您的企業是集合飯店、運動場以及餐廳和小館的運動休閒中心,而您要保護虛擬機器上的資料。For this tutorial let's assume your business is a sports complex with a hotel, stadium, and restaurants and concessions, and you are protecting the data on the virtual machines. 下列步驟會建立財務資料的備份原則。The following steps create a backup policy for the financial data.

  1. 在復原服務保存庫清單中,選取 myRecoveryServicesVault 開啟其儀表板。From the list of Recovery Services vaults, select myRecoveryServicesVault to open its dashboard.

    開啟 [案例] 功能表

  2. 在 [保存庫儀表板] 功能表中,按一下 [備份] 以開啟 [備份] 功能表。On the vault dashboard menu, click Backup to open the Backup menu.

  3. 在 [備份目標] 功能表中,從 [您的工作負載在何處執行] 下拉式功能表中,選取 AzureOn the Backup Goal menu, in the Where is your workload running drop-down menu, choose Azure. 從 [欲備份的項目] 下拉式清單,選擇 [虛擬機器],然後按一下 [備份]。From the What do you want to backup drop-down, choose Virtual machine, and click Backup.

    這些動作會準備好復原服務保存庫以與虛擬機器進行互動。These actions prepare the Recovery Services vault for interacting with a virtual machine. 復原服務保存庫的預設原則,每天都會建立還原點,並保留 30 天。Recovery Services vaults have a default policy that creates a restore point each day, and retains the restore points for 30 days.

    開啟 [案例] 功能表

  4. 若要建立新的原則,在 [備份原則] 功能表中,從 [選擇備份原則] 下拉式功能表中,選取 [新建]。To create a new policy, on the Backup policy menu, from the Choose backup policy drop-down menu, select Create New.

    選取工作負載

  5. 在 [備份原則] 功能表上,針對 [原則名稱] 鍵入 FinanceIn the Backup policy menu, for Policy Name type Finance. 輸入備份原則的下列變更:Enter the following changes for the Backup policy:

    • 針對 [備份頻率]將時區設定為 [美國中部時間]。For Backup frequency set the timezone for Central Time. 因為運動休閒中心位在德州,所以業主希望使用本地時間。Since the sports complex is in Texas, the owner wants the timing to be local. [備份頻率] 保持設定為 [每天] 上午 3:30 執行。Leave the backup frequency set to Daily at 3:30AM.

    • 針對 [每日備份點保留期],將期限設定為 90 天。For Retention of daily backup point, set the period to 90 days.

    • 針對 [每週備份點保留期],還原點使用 [星期一] 並保留 52 週。For Retention of weekly backup point, use the Monday restore point and retain it for 52 weeks.

    • 針對 [每月備份點保留期],還原點使用每月第一個星期日並保留 36 個月。For Retention of monthly backup point, use the restore point from First Sunday of the month, and retain it for 36 months.

    • 取消選取 [每年備份點保留期] 選項。Deselect the Retention of yearly backup point option. 財務部主管不希望資料保留期限超過 36 個月。The leader of Finance doesn't want to keep data longer than 36 months.

    • 按一下 [確定] 可建立備份原則。Click OK to create the backup policy.

      選取工作負載

      建立備份原則之後,再建立該原則與虛擬機器的關聯性。After creating the backup policy, associate the policy with the virtual machines.

  6. 在 [選取虛擬機器] 對話方塊中選取 [myVM],然後按一下 [確定] 將備份原則部署到虛擬機器。In the Select virtual machines dialog select myVM and click OK to deploy the backup policy to the virtual machines.

    所有位於相同地點且未與備份原則相關聯的虛擬機器都會出現。All virtual machines that are in the same location, and are not already associated with a backup policy, appear. 已選取 myVMH1myVMR1 要與 Finance 原則建立關聯性。myVMH1 and myVMR1 are selected to be associated with the Finance policy.

    選取工作負載

    完成部署之後,您會收到已順利完成部署的通知。When the deployment completes, you receive a notification that deployment successfully completed.

初始備份Initial backup

您已啟用復原服務保存庫的備份,但尚未建立初始備份。You have enabled backup for the Recovery Services vaults, but an initial backup has not been created. 災害復原的最佳做法是觸發第一個備份,這樣可以保護資料。It is a disaster recovery best practice to trigger the first backup, so that your data is protected.

執行隨選備份作業:To run an on-demand backup job:

  1. 在保存庫儀表板中,按一下 [備份項目] 下的 [3],開啟 [備份項目] 功能表。On the vault dashboard, click 3 under Backup Items, to open the Backup Items menu.

    設定圖示

    [備份項目] 功能表隨即開啟。The Backup Items menu opens.

  2. 在 [備份項目] 功能表上,按一下 [Azure 虛擬機器] 開啟與保存庫相關聯的虛擬機器清單。On the Backup Items menu, click Azure Virtual Machine to open the list of virtual machines associated with the vault.

    設定圖示

    [備份項目] 清單隨即開啟。The Backup Items list opens.

    備份作業已觸發

  3. 在 [備份項目] 清單上,按一下省略符號 ... 以開啟操作功能表。On the Backup Items list, click the ellipses ... to open the Context menu.

  4. 在操作功能表上,選取 [立即備份]。On the Context menu, select Backup now.

    內容功能表

    [立即備份] 功能表隨即開啟。The Backup Now menu opens.

  5. 在 [立即備份] 功能表中,輸入保留復原點的最後一天,然後按一下 [備份]。On the Backup Now menu, enter the last day to retain the recovery point, and click Backup.

    設定 [立即備份] 復原點保留的最後一天

    部署通知可讓您知道已觸發備份工作,而且您可以在 [備份工作] 頁面上監視作業的進度。Deployment notifications let you know the backup job has been triggered, and that you can monitor the progress of the job on the Backup jobs page. 視您虛擬機器的大小而定,建立初始備份可能需要花一點時間。Depending on the size of your virtual machine, creating the initial backup may take a while.

    初始備份作業完成後,您會在 [備份作業] 功能表中看到它的狀態。When the initial backup job completes, you can see its status in the Backup job menu. 隨選備份作業已建立 myVM 的初始還原點。The on-demand backup job created the initial restore point for myVM. 如果您想要備份其他虛擬機器,請為每部虛擬機器重複這些步驟。If you want to back up other virtual machines, repeat these steps for each virtual machine.

    備份工作圖格

清除資源Clean up resources

如果您打算繼續進行後續的教學課程,請勿清除在此教學課程中建立的資源。If you plan to continue on to work with subsequent tutorials, do not clean up the resources created in this tutorial. 如果您不打算繼續,請使用下列步驟,在 Azure 入口網站中刪除本教學課程所建立的所有資源。If you do not plan to continue, use the following steps to delete all resources created by this tutorial in the Azure portal.

  1. myRecoveryServicesVault 儀表板中,按一下 [備份項目] 下的3,開啟 [備份項目] 功能表。On the myRecoveryServicesVault dashboard, click 3 under Backup Items, to open the Backup Items menu.

    設定圖示

  2. 在 [備份項目] 功能表上,按一下 [Azure 虛擬機器] 開啟與保存庫相關聯的虛擬機器清單。On the Backup Items menu, click Azure Virtual Machine to open the list of virtual machines associated with the vault.

    設定圖示

    [備份項目] 清單隨即開啟。The Backup Items list opens.

  3. 在 [備份項目] 功能表中,按一下省略符號開啟操作功能表。In the Backup Items menu, click the ellipsis to open the Context menu.

    設定圖示

  4. 在操作功能表上選取 [停止備份] 開啟 [停止備份] 功能表。On the context menu select Stop backup to open Stop Backup menu.

    設定圖示

  5. 在 [停止備份] 功能表上,選取上方的下拉式功能表,然後選擇 [刪除備份資料]。In the Stop Backup menu, select the upper drop-down menu and choose Delete Backup Data.

  6. 在 [Type the name of the Backup item] (鍵入備份項目的名稱) 對話方塊中鍵入 myVMIn the Type the name of the Backup item dialog, type myVM.

  7. 確認備份項目後 (核取記號會出現),即啟用 [停止備份] 按鈕。Once the backup item is verified (a checkmark appears), Stop backup button is enabled. 按一下 [停止備份] 停止原則並刪除還原點。Click Stop Backup to stop the policy and delete the restore points.

    按一下 [停止備份] 刪除保存庫

  8. 在 [myRecoveryServicesVault] 功能表上按一下 [刪除]。In the myRecoveryServicesVault menu, click Delete.

    按一下 [停止備份] 刪除保存庫

    刪除保存庫後,您就會回到復原服務保存庫的清單。Once the vault is deleted, you return to the list of Recovery Services vaults.

後續步驟Next steps

在這篇教學中,您使用了 Azure 入口網站來:In this tutorial you used the Azure portal to:

  • 建立復原服務保存庫Create a Recovery Services vault
  • 設定保存庫以保護虛擬機器Set the vault to protect virtual machines
  • 建立自訂的備份和保留原則Create a custom backup and retention policy
  • 指派原則以保護多部虛擬機器Assign the policy to protect multiple virtual machines
  • 觸發虛擬機器的隨選備份Trigger an on-demand back up for virtual machines

繼續下一個教學課程,從磁碟還原 Azure 虛擬機器。Continue to the next tutorial to restore an Azure virtual machine from disk.