Back up OSS files

Updated at:

To protect against data loss or corruption caused by accidental deletion, modification, or overwriting, we recommend that you use Cloud Backup to back up all directories and files in an Object Storage Service (OSS) bucket. Cloud Backup supports flexible backup policies that back up data to the cloud, so you can view and restore data at any time. This topic describes how to use Cloud Backup to back up files 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 Cloud Backup storage capacity fees and OSS request fees. OSS request fees are charged by OSS. For more information, see OSS backup fees.

  • You have created a bucket of the Standard or Infrequent Access (IA) storage class. For more information, see Create buckets.

  • If you want to use the OSS inventory feature to back up a large volume of OSS data, the inventory file must meet specific requirements. For details, see Back up large volumes of OSS objects with OSS inventory.

Usage notes

  • When you create a backup plan or associate a backup policy for the first time, Cloud Backup automatically creates the service-linked role AliyunServiceRoleForHbrOssBackup to obtain permissions to access associated resources. An authorization dialog box appears. Grant the permissions to the role as prompted.

  • When you use Cloud Backup to protect OSS data, take note of the following items:

    • Cloud Backup backs up and restores only buckets of the Standard and Infrequent Access (IA) storage classes. Buckets of the Archive, Cold Archive, and Deep Cold Archive storage classes cannot be backed up or restored.

    • Cloud Backup backs up and restores objects of the Standard and Infrequent Access (IA) storage classes. An IA object is restored as a Standard object. Objects of the Archive, Cold Archive, and Deep Cold Archive storage classes cannot be backed up or restored.

    • Cloud Backup does not back up or restore the read and write permissions (ACLs) of objects.

  • When you delete an earlier backup version from the backup history, the integrity of other backup versions is not affected.

  • The Scheduled Backup feature that you enable when you create a bucket in the OSS console provides a 30-day free trial and is automatically disabled when the trial expires. You can also view and manage this backup plan in the Cloud Backup console. We recommend that you switch to a paid plan before the trial expires.

    Important

    Free trial plans have limitations: you cannot edit the backup path or backup cycle. Each free backup plan uses an independent backup vault, and the backup vault cannot be changed after you switch to a paid plan. If you plan to back up all data to the same backup vault in the future, do not use a free trial plan.

  • Billing

    • Backing up OSS data incurs OSS request fees, which are charged by OSS. For more information, see Billing overview.

    • When Cloud Backup reads OSS data from an IA bucket or object for backup, OSS data retrieval fees are incurred. These fees are calculated based on the amount of data retrieved and are charged by OSS. For more information, see Data processing fees.

Video tutorial

Back up OSS files

Note

After a backup plan is created, the first backup job is a full backup. Subsequent backup jobs are incremental backups by default.

Create a backup plan

  1. On the OSS Backup page, select the region in which the target OSS bucket resides, and click Add OSS Backup.

    Note

    If you use the previous version of the console (which displays Try New Version in the upper-right corner), click Create Backup Plan on the Backup Plan tab.

  2. In the Create Backup Plan panel, configure the parameters as described below, and then click OK.

    Note

    After you select an OSS bucket, the system automatically determines whether the bucket is eligible for a free trial. If the bucket is eligible, the free plan creation form is displayed by default. If the bucket is not eligible, the paid plan creation form is displayed. The paid plan creation form is the entry point for associating a backup policy. In the free plan form, you can click Switch to Paid Plan once to switch to the paid plan. To switch back to the free plan, close the dialog box and click Add OSS Backup again. Cloud Backup then rechecks whether the selected bucket is eligible for a free trial.

    Select the Backup OSS Bucket to back up from the drop-down list, and then configure the following parameters based on the mode of the creation form.

    Free backup plan

    Important
    • For a free plan, Cloud Backup automatically creates the backup vault, and the encryption method of the backup vault is fixed as fully managed by Cloud Backup.

    • The backup path of a free plan is fixed to the root directory of the entire bucket. The backup cycle and retention policy are automatically configured and cannot be edited. Each free plan uses an independent backup vault, which cannot be changed after you switch to a paid plan. If you want to back up all data to the same backup vault, do not use a free trial plan.

    After you configure the following parameters, click OK.

    Parameter

    Description

    Account

    The account from which the resources to back up come. By default, This Account is selected. You can select an account that you have added for backup. Only one account can be selected.

    To manage cross-account backup, click Manage cross-account backup.

    Pay After Trial Ends

    Specifies whether to continue using the backup plan on a paid basis after the free backup plan expires.

    Backup plan name

    The system automatically generates a default name. You can also specify a custom name.

    Paid backup plan

    After you configure the following parameters, click OK.

    Parameter

    Description

    Account

    The account from which the resources to back up come. By default, This Account is selected. You can select an account that you have added for backup. Only one account can be selected.

    To manage cross-account backup, click Manage cross-account backup.

    Backup Bucket Prefix

    Select or enter the directory prefix of the bucket to back up from the drop-down list. Format: start with a first-level subdirectory and do not include the / prefix (for example, data/). If you do not specify a prefix, the entire bucket is backed up by default.

    Do Not Prompt that Archived Objects Are Not Backed Up

    Supported only in the China (Shanghai) and Malaysia (Kuala Lumpur) regions. By default, if a backup job encounters Archive objects, the job is marked as partially complete and these files are displayed in the failed file list. If you turn on this switch, Cloud Backup ignores Archive objects and does not report them.

    Backup Policy

    Select an appropriate backup policy from the drop-down list.

    Cloud Backup automatically backs up data sources according to the backup policy that you specify. A backup policy mainly includes the backup vault encryption method, backup interval, backup retention time, cross-region replication policy, automatic backup archiving, and backup point virus detection. It helps you flexibly manage the assets of each data source.

    If the default backup policies cannot meet your backup requirements, click Create Backup Policy or Edit Policy to manage backup policies. For information about backup policy parameters, see Policy Center.

    Performance Optimization

    Use OSS Inventory

    Specifies whether to use the OSS inventory feature to back up OSS data. The default value is No. We recommend that you use this feature only when you back up a large number of OSS objects.

  3. After the backup plan is created, the status of the backup plan changes to Running, and Cloud Backup runs OSS backup jobs based on the specified backup start time and backup interval. The bucket appears in the protected resources list on the OSS Backup page, and the value in the Number of backup plans column increases accordingly.

Backup status

Backup status

Description

Ready

The resource has just been added to the protected resources list and is waiting for its first backup.

Backing up

The backup is healthy and the resource is waiting for the next backup job.

Backing up (in progress)

The backup is healthy and a backup job is in progress.

Suspended

All backup plans of the resource are suspended. You can enable any backup plan in the backup plan list on the backup details page to resume backup.

Stopped

The backup resource cannot be found. The original resource may have been released. The backup data is automatically deleted after it expires. You can view the expiration time of the backup or restore data in the backup history list on the backup details page.

View backup jobs

At the scheduled backup time, Cloud Backup starts the backup job.

Note

The backup progress percentage is a dynamic estimate and is for reference only. The displayed amount of scanned data may be lower than the actual total while the scan is in progress. Only the final status of the backup job confirms its completion.

On the Backup Jobs tab, a Status of Completed indicates that the backup was successful. You can view details for the backup job, such as Total Scanned Data Amount at Source, Completed Backup Data Amount, Data Amount Written to Backup Vault, and Backup Speed. See the tooltips in the Cloud Backup console for descriptions of these metrics.

If the status of a backup job is Partially Completed, data of the Archive, Cold Archive, and Deep Cold Archive storage classes is not included because Cloud Backup does not support backing up Archive data.

If the status of a backup job is Timed out, the backup job did not complete within the specified period.

Note
  • For backup jobs completed on or after June 1, 2025, the Total Scanned Data Amount at Source, Completed Backup Data Amount, and Data Amount Written to Backup Vault display both data volume and file count. For backup jobs completed before this date, only the data volume is displayed.

  • The job list displays only backup job records from the last six months. To access older records, export them using Backup audit reports.

To cancel a running backup job, click Cancel in the Actions column of the backup job and confirm the cancellation.

Manage backup content

On the OSS Backup page, select the region in which the target OSS bucket resides, click View Details to the right of the target bucket, and then manage backup content in Backup History as needed.

Note

If you use the previous version of the console (which displays Try New Version in the upper-right corner), click the image icon in front of the target bucket on the Backup Plans tab to perform the operation. The operations in the previous version of the console are the same as those after you click the image icon to switch the display mode.

Browse backup files

The Browse feature lets you browse files that have been backed up. If a virus scan has been performed on the backup point that you browse, Cloud Backup marks the files that are infected.

  1. In Backup History, click Browse in the Actions column of the target backup point.

    Alternatively, click the image icon to the right of the backup history to switch the display mode, and then click the target backup point and select Browse.

  2. In the Browse panel, view the backed-up OSS files.

Note

Backed-up files cannot be downloaded directly. You can create a restore job, specify the destination bucket and prefix path, and then download the data after you restore the backup data to that path.

Extend retention period of backup points

If you need to retain the backed-up OSS data for a longer period, you can extend the retention period of backup points.

Important
  • The retention period of a backup point can only be extended, not shortened.

  • The retention period of a backup point that is set to never expire cannot be extended.

  1. In Backup History, click the image icon in the Expires At column of the target backup point.

    Alternatively, click the image icon to the right of the backup history to switch the display mode, and then click the target backup point and select the image icon to the right of Expires At.

  2. Set Schedule Time or select Never Expire, and then click Save.

    After the configuration is complete, you can view the new expiration time in the Expires At column.

Delete backup data

Delete the backup points generated by the backup client.

Important
  • Deleted backup points cannot be recovered. Proceed with caution.

  • If "Keep at least one backup version" is enabled in the backup policy associated with the data source, you cannot delete the latest backup. If you are sure that you want to delete this backup, disable this setting in the backup policy first, or disassociate the data source from the policy.

  • After you delete a backup plan, Cloud Backup removes the OSS bucket from the backup list when all backup points of the bucket expire automatically or are deleted.

In Backup History, delete backup points in list mode by using either of the following methods.

  • Delete a single backup point: Click Delete in the Actions column of the target backup point, and then confirm the deletion.

  • Delete backup points in batches: Select the target backup points, click Delete Backup Point below the list, and then confirm the deletion.

Alternatively, click the image icon to the right of the backup history to switch the display mode, and then click the target backup point and select Delete.

Manage backup plans

On the OSS Backup page, select the region in which the target OSS bucket resides, click View Details to the right of the target bucket, and then switch to the Backup Plans tab to manage backup plans as needed.

Note

If you use the previous version of the console (which displays Try New Version in the upper-right corner), perform the operations in the Actions column of the target bucket on the Backup Plans tab.

Run a backup immediately

In the Actions column of a backup plan, choose ┇ > Run Now to immediately start a backup.

Modify a backup plan

  1. Click Modify in the Actions column of the backup plan.

  2. In the Configure Plan panel, modify the backup policy and advanced settings as needed.

  3. Click OK.

Suspend or resume a backup plan

Backup plans are enabled by default. If you want to stop data backup during a specified period, you can suspend the backup plan, and then resume the backup plan when you need to back up data.

  • Suspend a plan: Turn off the switch in the Plan Status column, or choose ┇ > Suspend Plan in the Actions column, and then confirm the suspension.

    After backup is suspended, subsequent backup jobs are no longer executed. Existing backup points are not affected and automatically expire according to the configured retention period. If Keep at least one backup version is enabled in the associated backup policy, the last backup version is not affected by the retention period. If backup points still exist in the bucket after backup is suspended, billing for the bucket continues.

  • Resume a plan: After a backup plan is suspended, turn on the switch in the Plan Status column, or choose ┇ > Resume Plan in the Actions column.

Delete a backup plan

If you no longer need to periodically back up a resource, you can delete the backup plan.

Important

Deleted backup plans cannot be recovered. Proceed with caution.

In the Actions column of the backup plan, choose ┇ > Delete Plan, and then confirm the deletion.

Alert settings

In the Actions column of a backup plan, choose ┇ > Alert Settings to configure alert notifications for the backup plan.

Cancel OSS backup

To cancel OSS backup, delete the backup plan and delete all backup data.

Important

After OSS backup is canceled, the OSS bucket no longer appears in the protected OSS resource list.

Enterprise-grade capabilities

Virus detection

To prevent infected files from being restored to your production environment, Cloud Backup provides the Backup point virus detection feature. This helps you select an uninfected backup point for future restores. On the Backup Details tab, in the Backup History section, find the backup point you want to scan, click ┇ in the Actions column, and then select Virus Detection.

When you restore backup data, you can enable Virus detection upon restore. After this feature is enabled, Cloud Backup performs virus detection on all files to be restored: files detected as safe are restored directly, and files detected as viruses are not restored.

Backup vault replication

To prevent regional disasters or account management risks from affecting business continuity, Cloud Backup supports configuring Cross-region backup or Cross-account backup vault replication for backup vaults where the Storage Vault Type is General Backup. Once configured, data from the source backup vault is automatically synchronized to the destination backup vault, ensuring data consistency between the two locations. You can also perform cross-region data recovery from the destination backup vault as needed.

For general-purpose backup vaults that store OSS files, you can configure backup vault replication to implement cross-region or cross-account disaster recovery protection.

In addition, OSS file backup supports enterprise-grade features such as cross-account backup, automatic archiving, KMS encryption, and immutable backup.

Troubleshooting

If the Status of a backup plan or backup job is abnormal, you can resolve the issue based on the following suggestions.

  • Status of the backup job: Failed (the OSS bucket does not exist)

    The OSS bucket has been deleted.

    • If the OSS bucket was deleted as expected, you do not need to pay attention to the status of the backup job. To avoid additional backup storage capacity fees, we recommend that you choose Storage Vaults in the left-side navigation pane and delete the corresponding vault.

    • If the OSS bucket was deleted by mistake and you want to restore it, create an OSS bucket in the corresponding region and use it as the restore destination to restore the OSS files. For more information, see Create an OSS restore job.

  • Status of the backup job: Failed (No OSS inventory file is available. The next backup will automatically detect and use the latest inventory file.)

    No OSS inventory file is found in the specified directory (prefix). Go to the OSS console and check whether an inventory file has been created for the bucket.

  • Status of the backup plan: Suspended

    The backup plan is suspended. While the plan is suspended, Cloud Backup no longer protects the OSS bucket. We recommend that you enable the backup plan as soon as possible.

  • Status of the backup job: Timed out

    The backup job did not complete within the specified period. Check whether the volume of data to back up is too large. Alternatively, trigger the backup again by choosing ┇ > Run Now for the backup plan.

  • Backup job shows Completed but scans zero data

    If the status of a backup job is Completed but the amount of scanned data is 0 bytes and the number of files is 0, check whether the prefix (directory prefix) points to a directory that exists in the bucket and contains files. Enter the prefix starting from a first-level subdirectory, without the / prefix (for example, data/). If the directory that the prefix points to does not exist or contains no files, the backup scans 0 files.

    Note

    To back up the entire bucket, leave the prefix empty. If you enter /, the system blocks the operation and returns an error.

Related documents

  • Cloud Backup provides resource plans for various backup scenarios, which you can use to enjoy greater discounts. For more information, see Purchase resource plans.

  • The Cloud Backup Data synchronization feature synchronizes large volumes of OSS files from a source to a destination.

  • For more information about the product, see What is Cloud Backup.