Local CDP Recovery | Restore to the Original VM Instance

Assume that the user has deployed the latest ZStack Cloud Private Cloud environment and installed the Continuous Data Protection (CDP) module. Now, the user plans to add a local backup server to back up a VM instance. After the data is backed up to the local backup server, important files are lost by mistake during business adjustment. Since the user's business application has hardware authorization, in order to quickly verify the availability of the service, the user needs to restore the data to the original VM instance to check whether the application is normal.

The following table lists the user's environment configuration.
Table 1. Local Backup Server Configuration
Local Backup Server Configuration
Backup Server IP 172.24.246.195
Mount Path /cdp_store
SSH Port 22
User Name root
Password password
Management Network 172.24.246.195/16
Backup Network 192.168.1.0/24
The detailed steps are as follows:
  1. Add a local backup server.
  2. Create a CDP task.
  3. View the CDP data of the VM instance, and lock the recovery point.
  4. View the important file in the locked recovery point.
  5. Delete the important file to simulate important data loss.
  6. Find the locked recovery point, and restore data to the original VM instance.
  7. View the recovery progress and relevant information.
  8. Verify the restored data.
  1. Add a local backup server.

    On the main menu of ZStack Cloud, choose Platform O&M > Backup Management > Backup Server > Local Backup Server. On the Local Backup Server page, click Add Local Backup Server. Then, the Add Local Backup Server page is displayed.

    On the displayed page, set the following parameters:
    • Addition Method: Select Add Server here.
    • Name: Enter a name for the local backup server.

      The name must be 1 to 128 characters in length and can contain Chinese characters, letters, digits, spaces, hyphens (-), underscores (_), periods (.), parenthesis (), colons (:), and plus signs (+) and cannot begin or end with spaces.

    • Description: Optional. Enter a description for the local backup server.
    • Backup Server IP: Enter the IP address of the local backup server. In this scenario, enter 172.24.246.195.
    • Mount Path: Enter the path to which the storage is mounted. In this scenario, enter /cdp_store.
    • SSH Port: Enter the SSH port. Default: 22.
    • User Name: Enter the user name. In this scenario, enter root.
    • Password: Enter the password. In this scenario, enter password.
    • Backup Network: Optional. Set the backup network. In this scenario, enter 192.168.1.0/24.
    • Backup Data: Choose whether to scan the existing backup data. In this scenario, we do not need to scan the backup data.
    Figure 1. Add Local Backup Server


  2. Create a CDP task.

    On the main menu of ZStack Cloud, choose Platform O&M > Backup Management > CDP Service > CDP Task. On the CDP Task page, click Create CDP Task. Then, the Create CDP Task page is displayed.

    To create a CDP task, follow these three steps:
    1. Set the basic information.
      On the displayed page, set the following parameters:
      • Name: Enter a name for the CDP task.
      • Description: Optional. Enter a description for the CDP task.
      • VM Instance: Select the VM instance to be protected. In this scenario, select Business-VM-1.
        Note:
        • You can create CDP tasks in bulk by choosing multiple VM instances.
        • When you choose multiple VM instances, the name of CDP tasks will be followed by -1, -2, -3 and so forth to distinguish these tasks.
        • One VM instance corresponds to one CDP task.
        • After you create a CDP task for a VM instance, the Cloud performs a full backup for the VM instance.
        • Shared volumes (if any) of a VM instance will not be backed up.
        • You could not create a CDP task for VM instances with running backup jobs.
        • If a VM instance is in the stopped state, the CDP task created for the VM instance is also in the stopped state and can start with the VM instance.
      • Local Backup Server: In this scenario, select the added local backup server.
      Figure 2. Set Basic Information


    2. Set the policy information.
      On the displayed page, set the following parameters:
      • CDP Protection Policy: Set the CDP protection policy, including recovery point interval, recovery point retention policy, backup rate, and task running policy.
        • Recovery Point Interval: Set the interval for generating recovery points. Unit: second, minute. By default, a recovery point is generated at an interval of 3 seconds. In this scenario, use the default value.
        • Backup Aggregation Frequency: Set the interval for aggregating full backups. Valid range: 1-7 days, integer. By default, a full backup is aggregated every 7 days. In this scenario, use the default value.
        • Recovery Point Retention Policy: Set the retention time and retention interval for recovery points. Up to 3 policies can be set.
        • Backup Rate: Optional. You can limit the upstream bandwidth of each volume. Unit: Mbps/Gbps. In this scenario, select No limit.
      • Task Running Policy: Set the desired size and RPO policy for a CDP task.
        • Desired Size: Set the desired size for a CDP task. The CDP task will be stopped if the desired size is exceeded. In this scenario, use the suggested size.
          Note:
          • The desired size must be greater than or equal to the total volume size and smaller than or equal to the total backup server size.
          • The Cloud provides a recommended size according to the following formula:
            Recommended size = Maximum production data size X Number of full backups X 1.1 + Daily changed data size X Recovery point retention time X 1.5
            • Maximum production data size: The maximum data size generated by your VM instance for one full backup. This value cannot exceed the total volume size of your VM instance.
            • Number of full backups: Recovery point retention time ÷ Regular backup frequency.
            • Daily changed data size: We recommend that you estimate the size of daily changed data based on your actual business scenario. For example, if the data of your VM instance increases by 1 GB per month, you can set the daily changed data size to 35 MB.
            • Recovery point retention time: The maximum retention time you set on the UI.
            • Maximum production data size X Number of full backups X 1.1: During the data retention period, the CDP task will perform more than one full backup. Some cases, such as VM restart, will also trigger a full backup. Therefore, the actual number of full backups will increase according to a certain proportion. (The coefficient here is 1.1, which can be adjusted according to the actual situation.)
            • Daily changed data size X Recovery point retention time X 1.5: The size occupied by snapshot volumes is approximately 1.5 times the actual size of data changes.
            • The formula above is for your reference in initial backup capacity planning. We recommend that you pay continuous attention to your backup server size changes, and expand the capacity in a timely manner according to the actual situation.
        • RPO Policy: Set the CDP task running policy to deal with data replication latency in heavy I/O scenarios. By default, the CDP task will be stopped if the latency exceeds 10 minutes. After the data replication is synchronized, the CDP task will go back to the running status automatically. In this scenario, use the default value.
      Figure 3. Set Policy Information


    3. Preview

      View the information about the CDP task. You can edit the information by clicking the Edit icon.

      Figure 4. Preview


  3. View the CDP data of the VM instance, and lock the recovery point.
    On the main menu of ZStack Cloud, choose Resource Center > Resource Pool > Virtual Resource > VM Instance. Then, the VM Instance page is displayed.
    1. View the CDP data of the VM instance.

      On the displayed page, find VM-1, and enter its details page. On the CDP Data tab page, view the CDP data of the VM instance.

      Figure 5. View CDP Data


    2. Lock the recovery point.

      Assume that the user plans to make a major business adjustment after 10:00:00, and the data before 10:00:00 needs to be marked.

      On the CDP Data tab page, choose one column (10:00:00 - 10:59:59), and click the corresponding arrow icon on the right of the list. Then, the recovery point list is displayed. On the recovery point list, choose one recovery point (10:00:00), and select the corresponding Lock Recovery Point checkbox. Then, enter a description for the locked recovery point.

      Figure 6. Lock Recovery Point


  4. View the important file in the locked recovery point.

    Assume the name of the important file is importantFile.

    On the main menu of ZStack Cloud, choose Resource Center > Resource Pool > Virtual Resource > VM Instance. Then, the VM Instance page is displayed. Click the VM instance to enter its details page. On the CDP Data tab page, click the arrow icon beside the number of Locked Recovery Point. Then, the Locked Recovery Point List page is displayed. Find the recovery point that you locked before, and click Retrieve File. On the displayed Retrieve File page, enter importantFile in the search box to find it. You can find that the file is contained in the current locked recovery point.

    Figure 7. View Important File in Locked Recovery Point


  5. Delete the important file to simulate important data loss.

    Assume that the user deleted the importantFile by mistake during business adjustment, and caused important data loss.

    Figure 8. Delete File


  6. Find the locked recovery point, and restore data to the original VM instance.

    On the main menu of ZStack Cloud, choose Resource Center > Resource Pool > Virtual Resource > VM Instance. Then, the VM Instance page is displayed. Click the VM instance to enter its details page. On the CDP Data tab page, click the arrow icon beside the number of Locked Recovery Point. Then, the Locked Recovery List page is displayed.

    Figure 9. Locked Recovery Point List


    On the Locked Recovery Point List page, find the 2022-08-01 10:00:00 corresponding locked recovery point to perform data restoration. To restore data, follow these three steps:
    1. Configure Recovery Policy.
      On the displayed page, set the following parameters:
      • CDP Task: Display the CDP task corresponding to current locked recovery point.
      • Recovery Point: Display the selected locked recovery point.
      • Recovery Task Name: Restoring CDP data will automatically create a recovery task with a default task name. You can view the detailed recovery record in the recovery task list.
        Note: Recovery tasks created here are named in the format of VM Name-Recovery Point Time, for example, VM-1-2022-08-01-10:00:00.
      • Recovery Policy: In this scenario, select Restore to Original VM Instance.
        Note:
        • The Cloud supports two recovery policies: create VM instance and restore to original VM instance.
        • After the recovery is performed, the original VM instance will quickly start up for business recovery.
        • During the recovery, the original VM instance will be in the Restoring Data state. In this case, only the Launch Console action is supported.
      • Recovery Method: You can restore the CDP data to the original VM instance by creating new volumes or overwriting the current volumes. In this scenario, select Overwrite Current Volumes.
        • Create Volumes:
          • This method will create new volumes to replace the current volumes. Data in the current volumes will be retained.
          • This method will detach the current volumes. You can view the newly created and detached volumes on the configuration tab page of the VM instance.
          • After you confirm that the restored data is reliable, you can manually delete the detached volumes to release the storage space.
        • Overwrite Current Volumes:
          • This method will overwrite the original data in the VM instance. Please exercise caution.
          • This method will keep the snapshots in the current volumes.
      • Recovery Rate: Optional. You can limit the upstream bandwidth of each volume in CDP protection. Unit: Mbps/Gbps. In this scenario, select No limit.
      Figure 10. Configure Recovery Policy


    2. Configure Target VM.

      By default, the name and description of the original VM instance are displayed.

      Figure 11. Configure Target VM


    3. Preview.

      View the recovery task that will be created. You can edit the information by clicking the Edit icon.

      Figure 12. Preview


  7. View the recovery progress and relevant information.

    On the main menu of ZStack Cloud, choose Platform O&M > Backup Management > CDP Service > Recovery Task. Then, the Recovery Task page is displayed. On the Recovery Task main list, you can view the job status, target VM, time consumed, and other information.

    Figure 13. View Recovery Progress


  8. Verify the restored data.

    Launch the VM console and run the ls command to view the file in the directory. You can find that the importantFile already exists in the directory.

    Figure 14. Data Recovery Succeeded


You can unlock the recovery point after a successful recovery to release storage space. So far, we have introduced the CDP scenario practice of restoring data to the original VM instance.


Local CDP Recovery | Create a VM Instance

Assume that the user has deployed the latest version of ZStack Cloud Private Cloud environment, and installed the Continuous Data Protection (CDP) module. The user plans to add a local backup server to backup a VM instance. After the data is backed up to the local backup server, important files are lost by mistake during business adjustment. Because not knowing the specific time when the problem occurred, the user is afraid to directly overwrite the original VM instance. Now the user needs to restore the data to a new VM instance to check whether the system is healthy.

The following table lists the user's environment configuration.
Table 1. Local Backup Server Configuration
Local Backup Server Configuration
Backup Server IP 172.24.246.195
Mount Path /cdp_store
SSH Port 22
User Name root
Password password
Management Network 172.24.246.195/16
Backup Network 192.168.1.0/24
The detailed practice steps are as follows:
  1. Add a local backup server.
  2. Create a CDP task.
  3. View the local CDP data of the VM instance and an important file.
  4. Delete the important file to simulate the loss of the important data.
  5. Restore to a new VM instance from current recovery point.
  6. View the recovery progress and relevant information.
  7. Verify the restored data.
  1. Add a local backup server.

    On the main menu of ZStack Cloud, choose Platform O&M > Backup Management > Backup Server > Local Backup Server. On the Local Backup Server page, click Add Local Backup Server. Then, the Add Local Backup Server page is displayed.

    On the displayed page, set the following parameters:
    • Addition Method: Select Add Server here.
    • Name: Enter a name for the local backup server.

      The name must be 1 to 128 characters in length and can contain Chinese characters, letters, digits, spaces, hyphens (-), underscores (_), periods (.), parenthesis (), colons (:), and plus signs (+) and cannot begin or end with spaces.

    • Description: Optional. Enter a description for the local backup server.
    • Backup Server IP: Enter the IP address of the local backup server. In this scenario, enter 172.24.246.195.
    • Mount Path: Enter the path to which the storage is mounted. In this scenario, enter /cdp_store.
    • SSH Port: Enter the SSH port. Default: 22.
    • User Name: Enter the user name. In this scenario, enter root.
    • Password: Enter the password. In this scenario, enter password.
    • Backup Network: Optional. Set the backup network. In this scenario, enter 192.168.1.0/24.
    • Backup Data: Choose whether to scan the existing backup data. In this scenario, we do not need to scan the backup data.
    Figure 1. Add Local Backup Server


  2. Create a CDP task.

    On the main menu of ZStack Cloud, choose Platform O&M > Backup Management > CDP Service > CDP Task. On the CDP Task page, click Create CDP Task. Then, the Create CDP Task page is displayed.

    To create a CDP task, follow these three steps:
    1. Set the basic information.
      On the displayed page, set the following parameters:
      • Name: Enter a name for the CDP task.
      • Description: Optional. Enter a description for the CDP task.
      • VM Instance: Select the VM instance to be protected. In this scenario, select Business-VM-1.
        Note:
        • You can create CDP tasks in bulk by choosing multiple VM instances.
        • When you choose multiple VM instances, the name of CDP tasks will be followed by -1, -2, -3 and so forth to distinguish these tasks.
        • One VM instance corresponds to one CDP task.
        • After you create a CDP task for a VM instance, the Cloud performs a full backup for the VM instance.
        • Shared volumes (if any) of a VM instance will not be backed up.
        • You could not create a CDP task for VM instances with running backup jobs.
        • If a VM instance is in the stopped state, the CDP task created for the VM instance is also in the stopped state and can start with the VM instance.
      • Local Backup Server: In this scenario, select the added local backup server.
      Figure 2. Set Basic Information


    2. Set the policy information.
      On the displayed page, set the following parameters:
      • CDP Protection Policy: Set the CDP protection policy, including recovery point interval, recovery point retention policy, backup rate, and task running policy.
        • Recovery Point Interval: Set the interval for generating recovery points. Unit: second, minute. By default, a recovery point is generated at an interval of 3 seconds. In this scenario, use the default value.
        • Backup Aggregation Frequency: Set the interval for aggregating full backups. Valid range: 1-7 days, integer. By default, a full backup is aggregated every 7 days. In this scenario, use the default value.
        • Recovery Point Retention Policy: Set the retention time and retention interval for recovery points. Up to 3 policies can be set.
        • Backup Rate: Optional. You can limit the upstream bandwidth of each volume. Unit: Mbps/Gbps. In this scenario, select No limit.
      • Task Running Policy: Set the desired size and RPO policy for a CDP task.
        • Desired Size: Set the desired size for a CDP task. The CDP task will be stopped if the desired size is exceeded. In this scenario, use the suggested size.
          Note:
          • The desired size must be greater than or equal to the total volume size and smaller than or equal to the total backup server size.
          • The Cloud provides a recommended size according to the following formula:
            Recommended size = Maximum production data size X Number of full backups X 1.1 + Daily changed data size X Recovery point retention time X 1.5
            • Maximum production data size: The maximum data size generated by your VM instance for one full backup. This value cannot exceed the total volume size of your VM instance.
            • Number of full backups: Recovery point retention time ÷ Regular backup frequency.
            • Daily changed data size: We recommend that you estimate the size of daily changed data based on your actual business scenario. For example, if the data of your VM instance increases by 1 GB per month, you can set the daily changed data size to 35 MB.
            • Recovery point retention time: The maximum retention time you set on the UI.
            • Maximum production data size X Number of full backups X 1.1: During the data retention period, the CDP task will perform more than one full backup. Some cases, such as VM restart, will also trigger a full backup. Therefore, the actual number of full backups will increase according to a certain proportion. (The coefficient here is 1.1, which can be adjusted according to the actual situation.)
            • Daily changed data size X Recovery point retention time X 1.5: The size occupied by snapshot volumes is approximately 1.5 times the actual size of data changes.
            • The formula above is for your reference in initial backup capacity planning. We recommend that you pay continuous attention to your backup server size changes, and expand the capacity in a timely manner according to the actual situation.
        • RPO Policy: Set the CDP task running policy to deal with data replication latency in heavy I/O scenarios. By default, the CDP task will be stopped if the latency exceeds 10 minutes. After the data replication is synchronized, the CDP task will go back to the running status automatically. In this scenario, use the default value.
      Figure 3. Set Policy Information


    3. Preview

      View the information about the CDP task. You can edit the information by clicking the Edit icon.

      Figure 4. Preview


  3. View the local CDP data of the VM instance and an important file.

    Assume that the user made an important business adjustment on the day of 2022-08-01, and the user viewed the important data in the system before business adjustment.

    On the main menu of ZStack Cloud, choose Resource Center > Resource Pool > Virtual Resource > VM Instance. Then, the VM Instance page is displayed. On the CDP Data tab page, view the data for any time period on 2022-08-01 (for example, 2022-08-01 10:00:00), and click Retrieve File. On the displayed Retrieve File page, enter importantFile in the search box to find it. You can find that the file is contained in the current recovery point.

    Figure 5. View Important File in Recovery Point


  4. Delete the important file to simulate important data loss.

    Assume that the user deleted the importantFile by mistake during business adjustment, and caused important data loss.

    Figure 6. Delete File


  5. Restore to a new VM instance from current recovery point.

    Assume that the user does not know the specific time when the mistake was made, and is afraid to overwrite the original VM instance. So, the user needs to create a new VM instance to verify the restoration.

    On the main menu of ZStack Cloud, choose Resource Center > Resource Pool > Virtual Resource > VM Instance. Then, the VM Instance page is displayed. Click the VM instance to enter its details page. On the CDP Data tab page, select date 2022-08-01, and perform data restoration operation. To restore data, refer to the following three steps:
    1. Configure Recovery Policy.
      On the displayed page, set the following parameters:
      • CDP Task: Display the CDP task corresponding to current locked recovery point.
      • Recovery Point: You can select a recovery point from the recovery point list (including locked recovery points) or from the locked recovery point list. In this scenario, select a recovery point corresponding to a certain time on 2022-08-01.
        Note:
        • The recovery point list allows you to search for a recovery point by date, hour, and minute/second.
        • When you search by hour, you can choose between hours with one hour as the interval.
        • When you search by date, the Cloud provides a recovery point calendar, where dates with recovery points are marked in green for quick identification.
        • When you search by minute/second, we recommend that you specify a time based on the recovery point interval you set before.
        • The locked recovery point list displays all the locked recovery points by default, and allows you to search by date.
      • Recovery Task Name: By default, restoring CDP data creates recovery task, and sets the default task name. You can view the detail recovery record in the recovery task list.
        Note: Recovery tasks created here are named in the format of VM Name-Recovery Point Time, for example, VM-1-2022-08-01-10:00:00.
      • Recovery Policy: In this scenario, select Create VM Instance.
        Note:
        • This method will create a VM instance from the current recovery point. The original one will not be affected.
        • The newly created VM instance will quickly start up for business recovery.
        • During the recovery, the newly created VM instance will be in the Restoring Data state. In this case, only the Launch Console action is supported.
      • Recovery Rate:Optional. You can limit the upstream bandwidth of each volume in CDP protection. Unit: Mbps/Gbps. In this scenario, select No limit.
      Figure 7. Configure Recovery Policy


    2. Configure Target VM.
      On the displayed page, set the following parameters:
      • Name: Enter a name for the new VM instance. For example, VM-from-CDP.
      • Description: Optional. Enter a description for the new VM instance.
      • Tag: Optional. Attach a tag for the new VM instance.
      • Instance Offering: By default, we recommend that you use the same instance offering as the original VM instance.
      • Network Configuration: By default, we recommend that you use the same network configuration as the original VM instance.
      • Primary Storage: By default, we recommend that you use the same primary storage as the original VM instance.
        Note: If the VM instance has attached a SharedBlock volume, the provisioning type will set to thick provisioning by default when recovering data.
      • Host: By default, we recommend that you use the same host as the original VM instance.
      Figure 8. Configure Target VM


    3. Preview.

      View the recovery task that will be created. You can edit the information by clicking the Edit icon.

      Figure 9. Preview


  6. View the recovery progress and relevant information.

    On the main menu of ZStack Cloud, choose Platform O&M > Backup Management > CDP Service > Recovery Task. Then, the Recovery Task page is displayed. On the Recovery Task main list, you can view the job status, target VM, time consumed, and other information.

    Figure 10. View Recovery Progress


  7. Verify the restored data.

    Launch the console of the newly created VM instance (VM-from-CDP). Then, run the ls command to view the file in the directory. You can find that the importantFile already exists in the directory.

    Figure 11. Verify Restored Data


So far, we have introduced the CDP scenario practice of restoring data by creating a new VM instance.

Back to Top

Download

Already filled the basic info?Click here.

Enter at least 2 characters.
Invalid mobile number.
Enter at least 4 characters.
Invalid email address.
Wrong code. Try again. Send Code Resend Code (60s)

An email with a verification code will be sent to you. Make sure the address you provided is valid and correct.

同意 不同意

I have read and concur with the Site TermsPrivacy PolicyRules and Conventions on User Management of ZStack Cloud

Download

Not filled the basic info yet? Click here.

Invalid email address or mobile number.
同意 不同意

I have read and concur with the Site TermsPrivacy PolicyRules and Conventions on User Management of ZStack Cloud

Email Us

contact@zstack.io
ZStack Training and Certification
Enter at least 2 characters.
Invalid mobile number.
Enter at least 4 characters.
Invalid email address.
Wrong code. Try again. Send Code Resend Code (60s)

同意 不同意

I have read and concur with the Site TermsPrivacy PolicyRules and Conventions on User Management of ZStack Cloud

Email Us

contact@zstack.io
Request Trial
Enter at least 2 characters.
Invalid mobile number.
Enter at least 4 characters.
Invalid email address.
Wrong code. Try again. Send Code Resend Code (60s)

同意 不同意

I have read and concur with the Site TermsPrivacy PolicyRules and Conventions on User Management of ZStack Cloud

Email Us

contact@zstack.io

The download link is sent to your email address.

If you don't see it, check your spam folder, subscription folder, or AD folder. After receiving the email, click the URL to download the documentation.

The download link is sent to your email address.

If you don't see it, check your spam folder, subscription folder, or AD folder.
Or click on the URL below. (For Internet Explorer, right-click the URL and save it.)

Thank you for using ZStack products and services.

Submit successfully.

We'll connect soon.

Thank you for using ZStack products and services.