Skip to main content

此版本的 GitHub Enterprise 将停止服务 2022-09-28. 即使针对重大安全问题,也不会发布补丁。 要获得更好的性能、改进的安全性和新功能,请升级到 GitHub Enterprise 的最新版本。 如需升级方面的帮助,请联系 GitHub Enterprise 支持

Backing up and restoring GitHub Enterprise Server with GitHub Actions enabled

GitHub Actions data on your external storage provider is not included in regular GitHub Enterprise Server backups, and must be backed up separately.

GitHub Actions 使用外部存储来存储工作流程工件和日志。 此数据存储在您的外部提供商上,例如 Azure blob 存储、Amazon S3 或 MinIO。 因此,GitHub Enterprise Server 备份和 GitHub Enterprise Server 高可用性配置无法为存储在此外部存储上的数据提供保护,而是依赖于外部存储提供商(如 Azure 或 AWS)提供的数据保护和复制。

If you use GitHub Enterprise Server 备份实用程序 to back up 您的 GitHub Enterprise Server 实例, it's important to note that GitHub Actions data stored on your external storage provider is not included in the backup.

This is an overview of the steps required to restore 您的 GitHub Enterprise Server 实例 with GitHub Actions to a new appliance:

  1. Confirm that the original appliance is offline.

  2. Manually configure network settings on the replacement GitHub Enterprise Server appliance. Network settings are excluded from the backup snapshot, and are not overwritten by ghe-restore.

  3. To configure the replacement appliance to use the same GitHub Actions external storage configuration as the original appliance, from the new appliance, set the required parameters with ghe-config command.

    • Azure Blob Storage
      ghe-config secrets.actions.storage.blob-provider "azure"
      ghe-config secrets.actions.storage.azure.connection-string "_Connection_String_"
    • Amazon S3
      ghe-config secrets.actions.storage.blob-provider "s3"
      ghe-config secrets.actions.storage.s3.bucket-name "_S3_Bucket_Name"
      ghe-config secrets.actions.storage.s3.service-url "_S3_Service_URL_"
      ghe-config secrets.actions.storage.s3.access-key-id "_S3_Access_Key_ID_"
      ghe-config secrets.actions.storage.s3.access-secret "_S3_Access_Secret_"
    • Optionally, to enable S3 force path style, enter the following command:
      ghe-config secrets.actions.storage.s3.force-path-style true
  1. Enable GitHub Actions on the replacement appliance. This will connect the replacement appliance to the same external storage for GitHub Actions.

    ghe-config app.actions.enabled true
    ghe-config-apply
  2. After GitHub Actions is configured and enabled, use the ghe-restore command to restore the rest of the data from the backup. For more information, see "Restoring a backup."

  3. Re-register your self-hosted runners on the replacement appliance. For more information, see Adding self-hosted runners.

For more information on backing up and restoring GitHub Enterprise Server, see "Configuring backups on your appliance."