Code backup

更新时间:
复制 MD 格式

Backing up your code protects your company's code assets. By regularly synchronizing core data to a space that you control, your company can confidently use cloud-hosted services and meet security and compliance requirements for specific industries. This topic describes how to use the code backup feature.

Limits

  • Code backup is a feature exclusive to the Premium Edition of Alibaba Cloud DevOps. For more information about editions, see Editions.

  • You can back up repositories up to 20 GB in size. This limit does not include Git Large File Storage (LFS) capacity.

  • The Object Storage Service (OSS) used for backup storage does not support the Archive Storage, Cold Archive, or Deep Cold Archive storage classes. For more information about storage classes, see Storage classes.

Introduction to Codeup repository backup

Codeup supports full backups of all code repositories in your organization. You can back up repositories manually or on a schedule. To back up your repositories, you must provide an authorized Alibaba Cloud OSS bucket. This lets you back up your organization's code repositories securely and at a low cost.

  • What are the benefits of enabling repository backup?

    Code repositories are a core asset for your organization. Accidental operations, such as deleting a repository or using a force push, can cause data corruption or version loss. In these situations, it is critical to recover the repository accurately and quickly. Codeup optimizes the underlying Git to provide industry-leading features. It supports both full and incremental backups to meet your needs. This ensures that repositories hosted on Codeup can be backed up, traced, and restored.

  • Where are repository backups stored?

    After a repository is successfully backed up, it is stored in a standard path and format in the OSS bucket that you provide. To grant authorization for OSS access, an organization administrator can navigate to Global Settings > Code Backup on the Code Management main page.

  • Is the backup storage secure?

    Repository backups are stored in your organization's private OSS bucket. Codeup only performs upload operations related to the backup feature. It does not perform any other operations in your OSS bucket. This ensures that your data is secure.

  • How much storage space do backups use?

    Codeup uses two backup methods: full and incremental. The system automatically selects the appropriate method for each scenario. A full backup includes all references and objects in a repository. An incremental backup saves only the changes made since the previous backup. Combining incremental backups with an initial full backup improves backup speed and significantly reduces your OSS storage costs, while still ensuring backup accuracy. Codeup also supports automatic archiving of historical backups. You can manage historical repository backups in OSS at any time. This lets you clean up old, unneeded archives to further reduce costs.

Use the backup feature

An organization administrator can enable the code backup service. The procedure is as follows:

  1. Log in with an administrator account and navigate to the Code Management page. Click Global Settings and then click Code Backup.

    image

  2. To enable code backup, you must first set up your backup storage in Alibaba Cloud OSS.

    Note
    • Use a shared organization account for authorization. This avoids costs from frequent re-authorization due to personnel changes.

    • OSS billing is based on the amount of backup data. For more information, see OSS billing overview.

    1. Click Authorize OSS Service. On the Resource Access Management Quick Authorization page, click Confirm Authorization.

    2. After you grant authorization, select the Bucket Region and Bucket Name.

    3. You can select an existing bucket or create a new one. After you make your selection, click Save.

  3. Back up your code. Codeup supports two backup policies.

    • Scheduled backup: Backups run automatically on the day that you enable this option and then every 7 days thereafter.

    • Manual backup: A backup job runs immediately.

    Important

    A backup job can take some time to complete. To ensure data integrity, you cannot start another backup job while a backup is in progress. You also cannot detach the OSS authorization during a backup.

  4. Check backup results.

    Page view

    The Code Backup page shows the results of the most recent backup, including the last running time and the result. If a backup failed, click View Log to determine the cause of the failure:

    Email notification

    A backup job can take a long time to complete, so you do not need to monitor its progress. The backup result is sent to the organization administrator by email. Click View Details in the email to open the results page.

    View in a single repository

    After a backup is complete, navigate to a specific code repository. Go to Settings > Repository Backup to view the status of the most recent backup for that repository. If the backup failed, a summary of the failure reason is displayed.

Backup patterns and data recovery

For more information, see Backup rule description.