Skip to main content

Backing up and restoring GitHub Enterprise Server with GitHub Actions enabled

To restore a backup of GitHub Enterprise Server 인스턴스 when GitHub Actions is enabled, you must configure GitHub Actions before restoring the backup with GitHub Enterprise Server Backup Utilities.

About backups of GitHub Enterprise Server when using GitHub Actions

You can use GitHub Enterprise Server Backup Utilities to back up and restore the data and configuration for GitHub Enterprise Server 인스턴스 to a new instance. For more information, see "인스턴스에서 백업 구성."

However, not all the data for GitHub Actions is included in these backups. GitHub Actions는 외부 스토리지를 사용하여 워크플로 아티팩트와 로그를 저장합니다. 이 데이터는 Azure Blob Storage, Amazon S3, Google Cloud Storage, 또는 MinIO와 같은 외부 공급자에 저장됩니다. 따라서 GitHub Enterprise Server 백업 및 GitHub Enterprise Server 고가용성 구성은 이 외부 스토리지에 저장된 데이터에 대한 보호를 제공하지 않으며 대신 Azure, Google Cloud, 또는 AWS와 같은 외부 스토리지 공급자가 제공하는 데이터 보호 및 복제에 의존합니다.

Restoring a backup of GitHub Enterprise Server when GitHub Actions is enabled

To restore a backup of GitHub Enterprise Server 인스턴스 with GitHub Actions, you must manually configure network settings and external storage on the destination instance before you restore your backup from GitHub Enterprise Server Backup Utilities.

  1. Confirm that the source instance is offline.

  2. Manually configure network settings on the replacement GitHub Enterprise Server instance. Network settings are excluded from the backup snapshot, and are not overwritten by ghe-restore. For more information, see "Configuring network settings."

  3. SSH into the destination instance. For more information, see "관리 셸(SSH)에 액세스."

    Shell
    ssh -p 122 admin@HOSTNAME
    
  4. Configure the destination instance to use the same external storage service for GitHub Actions as the source instance by entering one of the following commands.

    • Azure Blob Storage:

      Shell
      ghe-config secrets.actions.storage.blob-provider "azure"
      
    • Amazon S3:

      Shell
      ghe-config secrets.actions.storage.blob-provider "s3"
      
    • Google Cloud Storage:

      Shell
      ghe-config secrets.actions.storage.blob-provider "gcs"
      
  5. 다음 명령을 입력하면 개체 틀 값을 연결한 외부 스토리지의 값으로 바꿔 외부 스토리지 연결을 구성합니다.

    • Azure Blob Storage:

      Shell
      ghe-config secrets.actions.storage.azure.connection-string "CONNECTION STRING"
      
    • Amazon S3:

      Shell
      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"
      

      다음 명령을 입력하여 S3에서 강제 경로 스타일을 사용하도록 설정할 수 있습니다.

      Shell
      ghe-config secrets.actions.storage.s3.force-path-style true
      
    • Google Cloud Storage:

      Shell
      ghe-config secrets.actions.storage.gcs.service-url "SERVICE URL"
      ghe-config secrets.actions.storage.gcs.bucket-name "BUCKET NAME"
      ghe-config secrets.actions.storage.gcs.access-key-id "HMAC ACCESS ID"
      ghe-config secrets.actions.storage.gcs.access-secret "HMAC SECRET"
      
  6. To prepare to enable GitHub Actions on the destination instance, enter the following command.

    Shell
    ghe-config app.actions.enabled true
    
  7. 구성을 적용하고 GitHub Actions을(를) 사용하도록 설정하여 외부 스토리지 공급자에 연결하려면 다음 명령을 입력합니다.

    Shell
    ghe-config-apply
    
  8. After GitHub Actions is configured and enabled, to restore the rest of the data from the backup, use the ghe-restore command. For more information, see "인스턴스에서 백업 구성."

  9. Re-register your self-hosted runners on the destination instance. For more information, see "자체 호스트형 실행기 추가."

  10. To ensure that the bundled actions that are pre-installed on your new instance are up to date, enter the following command.

    Shell
    ghe-config --unset 'app.actions.actions-repos-sha1sum'
    
    1. 구성을 적용하려면 다음 명령을 실행합니다.

      참고: 구성을 실행하는 동안 의 서비스가 다시 시작될 수 있으므로 짧은 가동 중지 시간이 발생할 수 있습니다.

      Shell
      ghe-config-apply
      
    2. 구성 실행이 완료될 때까지 기다립니다.