For backups of large data volumes, Cloud Backup can use the OSS inventory feature to significantly improve backup efficiency and performance. Cloud Backup offers flexible backup policy options to back up data to the cloud, which you can then view and restore at any time. This topic describes how to use Cloud Backup to back up a large number of objects in an OSS bucket.
Prerequisites
You have activated the Alibaba Cloud Cloud Backup service. Activating Cloud Backup is free of charge, but using the OSS backup feature of Cloud Backup incurs fees, such as Cloud Backup storage capacity fees and OSS request fees. The OSS request fees are charged by OSS. For more information, see OSS Backup Billing.
You have created a bucket of the Standard or Infrequent Access storage class. For more information, see Create a bucket.
If you use an existing OSS inventory file to create a backup plan, the file must meet the following requirements:
The inventory file must be a current version in the Enabled state, and its prefix must match the value of the Backup Bucket Prefix parameter in the backup plan.
The inventory file must include the following fields: Object Size, Storage Class, Last Modified Date, and ETag.
For more information, see Bucket inventory.
Background information
The OSS inventory feature is used to record information about specified objects in a bucket, such as their quantity, size, storage class, and encryption status. In backup scenarios that involve large datasets in OSS, using the OSS inventory feature with Cloud Backup can significantly improve the performance of incremental backups. We recommend that you use the OSS inventory feature for backups of more than 100 million objects. The generation time of an inventory file is determined by OSS, and a backup job will fail if it is started before the inventory file is generated.
Usage notes
Note the following when you back up OSS data by using the OSS inventory feature:
When you create a backup plan or bind a backup policy for the first time, Cloud Backup automatically creates the
AliyunServiceRoleForHbrOssBackupservice-linked role to access related resources. An authorization dialog box is displayed. Authorize the role as prompted.Cloud Backup supports backing up and restoring only Standard and Infrequent Access buckets. It does not support Archive, Cold Archive, or Deep Cold Archive buckets.
Cloud Backup supports backing up and restoring only Standard and Infrequent Access objects. It does not support Archive, Cold Archive, or Deep Cold Archive objects.
Cloud Backup does not support backing up or restoring the access control lists (ACLs) of objects.
Backing up OSS data incurs OSS request fees. For more information, see OSS billing methods.
When Cloud Backup reads data from buckets or objects of the Infrequent Access storage class for backup, it incurs OSS data retrieval fees. OSS charges these fees based on the amount of retrieved data. For more information, see Data processing fees.
Deleting earlier backup versions from the backup history does not affect the integrity of other backup versions.
OSS inventory files are maintained in the OSS console.
The Scheduled Backup feature that is enabled when you create an OSS bucket provides a 30-day free trial plan. It is automatically disabled upon expiration. We recommend that you switch to a paid plan in a timely manner.
ImportantFree trial plans have limitations. You cannot edit the backup path or backup cycle. Each free backup plan uses an independent backup vault, and you cannot change the backup vault after you switch to a paid plan. If you plan to back up all your data to the same backup vault in the future, do not use a free trial plan.
To improve the performance of incremental backups, Cloud Backup uses the latest inventory file generated within the last 7 days.
Generating an OSS inventory file takes time. The following limits apply:
If no OSS inventory file exists when a backup job is triggered, the job fails immediately.
If an OSS inventory file exists when a backup job is triggered but has not been updated since the last backup, the job fails.
When a backup job is triggered, it uses only the most recently generated OSS inventory file for the backup. New objects added to the inventory file after the backup is complete will be backed up in the next backup cycle.
The backup interval must be greater than or equal to the generation cycle of the OSS inventory to ensure that each backup can use an inventory file.
Therefore, we recommend that you set the initial backup time to a point in time after the OSS inventory file is generated. Alternatively, after the OSS inventory file is generated, click Run Now to manually perform a backup. This ensures the inventory file is used to accelerate the backup.
Create a periodic backup plan for large OSS volumes
After you create a backup plan, the first backup job is a full backup. Subsequent jobs are incremental backups by default.
Perform the following steps to create a backup plan.
Log on to the Cloud Backup console.
In the navigation pane on the left, choose .
On the OSS Backup page, click Create Backup Plan.
In the Create Backup Plan panel, configure the parameters as described in the following table, and then click OK.
NoteYou can use a free trial plan for one month after you create it. For example, if you create a backup plan on February 14, 2020, the free trial expires on March 14, 2020. Using this feature to back up Object Storage Service (OSS) incurs OSS request fees and OSS inventory storage fees. These fees are charged by OSS. For more information, see OSS metering and billing.
You cannot edit the backup path or backup cycle for the free trial plan. Each free trial plan uses a separate backup vault, and you cannot change the backup vault after you upgrade to a paid plan. If you plan to back up all your data to a single backup vault, do not use the free trial plan.
This topic uses a paid plan as an example to describe the parameter configurations. The configurations for a free plan are similar.
Click Switch to Paid Plan, and then click OK in the dialog box that appears.
Configure the basic settings as described in the following table.
Parameter
Description
Backup OSS Bucket
Select the name of the OSS bucket that you want to back up. Cloud Backup automatically lists all buckets in the selected region under your account.
Backup Bucket Prefix
Select the directory to back up. If you do not select a directory, the entire root directory of the bucket is backed up by default.
Backup Policy
Select a backup policy from the drop-down list.
Cloud Backup automatically backs up the data source based on the selected backup policy. A backup policy includes settings such as the encryption method for the backup vault, backup interval, retention period, cross-region replication, and automatic archiving, allowing for flexible management of your data source assets.
If the existing backup policies do not meet your requirements, click Create Backup Policy or Edit Policy to manage backup policies. For more information about the parameters in a backup policy, see Policy center.
Performance Optimization
Use OSS Inventory
Specifies whether to use the OSS inventory feature to back up OSS objects. For this scenario, set this parameter to Select Inventory.
No: The OSS inventory feature is not used. Cloud Backup backs up objects by traversing them.
Select Inventory: An existing OSS inventory file is used for backup to improve the performance of incremental OSS backups.
OSS Inventory Name
This parameter is required only when Use OSS Inventory is set to Select Inventory. From the OSS Inventory Name list, select an existing OSS inventory.
Using the OSS bucket inventory feature incurs fees. For details about the fees, see Bucket inventory billing.
The created OSS inventory file must meet the following requirements:
The inventory file must be a current version in the enabled state, and its prefix must match the value of the Backup Bucket Prefix parameter in the backup plan.
The inventory file must include the following fields: Object Size, Storage Class, Last Modified Date, and ETag.
The generation cycle of the OSS inventory must not be longer than the backup cycle. This ensures that each backup can use an inventory file.
Delete inventory file after backup
Specifies whether to delete the inventory file after the backup plan is complete. This action will delete the inventory file from the bucket. We recommend that you store the inventory file in a separate bucket, or choose not to delete the file and manage it manually.
Do Not Delete: Does not delete the inventory file. We recommend that you select this option if other applications access the OSS inventory file.
Delete Current: Deletes the inventory file used in the current backup job.
Delete All: After the backup is complete, deletes all inventory files generated before this backup. We recommend that you select this option if no other applications access the OSS inventory file.
After you create the backup plan, its status is Running. Cloud Backup then performs OSS backup jobs based on the specified start time and backup interval.
Troubleshooting
If a backup plan or job has an abnormal Status, refer to the following troubleshooting suggestions.
Backup job Status: Failed (OSS bucket does not exist)
The OSS bucket has been deleted.
If the OSS bucket was deleted as expected, you can ignore the backup job status. To avoid extra backup storage capacity fees, click Storage Vaults in the left-side navigation pane, find the corresponding backup vault, and delete it.
If the OSS bucket was deleted by mistake and you want to restore it, create an OSS bucket in the corresponding region. Use this bucket as the restore destination to restore the OSS objects. For more information, see Create an OSS restore job.
Backup job Status: Failed (No OSS inventory file is available. The next backup will automatically detect and use the latest inventory file.)
The OSS inventory file was not found in the specified directory (prefix). Go to the OSS console to check whether the bucket inventory file has been created.
Backup plan Status: Suspended
The backup plan has been suspended. After suspension, Cloud Backup no longer protects the OSS bucket. We recommend that you enable the backup plan as soon as possible.
Browse and download backup files
Browse backup files
Use the Browse feature to view backed-up objects.
On the Backup Plans tab, click the
icon next to the target OSS bucket.In the Backup History section, find the backup point for the desired time and click Browse.
Download backup files
You cannot download backed-up objects directly. Instead, restore them to a temporary OSS path at no charge, and then download them from OSS.
Next steps
Related topics
Cloud Backup offers resource plans with price discounts for various backup scenarios. For more information, see Resource plan purchase guide.
The data synchronization feature of Cloud Backup supports synchronizing large numbers of OSS objects from a source to a destination. For more information, see Data synchronization overview.