1
0
mirror of synced 2025-12-23 21:07:12 -05:00

Update Setting up a staging instance (#28292)

Co-authored-by: Matt Pollard <mattpollard@users.noreply.github.com>
Co-authored-by: Matt Pollard <mattpollard@github.com>
Co-authored-by: Laura Coursen <lecoursen@github.com>
This commit is contained in:
Sho Mizutani
2022-10-12 20:42:10 +09:00
committed by GitHub
parent 77d2ca5955
commit db77694065
6 changed files with 177 additions and 39 deletions

View File

@@ -1,7 +1,7 @@
---
title: Backing up and restoring GitHub Enterprise Server with GitHub Actions enabled
shortTitle: Backing up and restoring
intro: '{% data variables.product.prodname_actions %} data on your external storage provider is not included in regular {% data variables.product.prodname_ghe_server %} backups, and must be backed up separately.'
intro: 'To restore a backup of {% data variables.product.product_location %} when {% data variables.product.prodname_actions %} is enabled, you must configure {% data variables.product.prodname_actions %} before restoring the backup with {% data variables.product.prodname_enterprise_backup_utilities %}.'
versions:
ghes: '*'
type: how_to
@@ -13,43 +13,32 @@ topics:
redirect_from:
- /admin/github-actions/backing-up-and-restoring-github-enterprise-server-with-github-actions-enabled
---
{% data reusables.actions.enterprise-storage-ha-backups %}
If you use {% data variables.product.prodname_enterprise_backup_utilities %} to back up {% data variables.product.product_location %}, it's important to note that {% data variables.product.prodname_actions %} data stored on your external storage provider is not included in the backup.
## About backups of {% data variables.product.product_name %} when using {% data variables.product.prodname_actions %}
This is an overview of the steps required to restore {% data variables.product.product_location %} with {% data variables.product.prodname_actions %} to a new appliance:
You can use {% data variables.product.prodname_enterprise_backup_utilities %} to back up and restore the data and configuration for {% data variables.product.product_location %} to a new instance. For more information, see "[Configuring backups on your appliance](/admin/configuration/configuring-backups-on-your-appliance)."
1. Confirm that the original appliance is offline.
1. Manually configure network settings on the replacement {% data variables.product.prodname_ghe_server %} appliance. Network settings are excluded from the backup snapshot, and are not overwritten by `ghe-restore`.
1. To configure the replacement appliance to use the same {% data variables.product.prodname_actions %} external storage configuration as the original appliance, from the new appliance, set the required parameters with `ghe-config` command.
- Azure Blob Storage
```shell
ghe-config secrets.actions.storage.blob-provider "azure"
ghe-config secrets.actions.storage.azure.connection-string "_Connection_String_"
```
- Amazon S3
```shell
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:
```shell
ghe-config secrets.actions.storage.s3.force-path-style true
```
However, not all the data for {% data variables.product.prodname_actions %} is included in these backups. {% data reusables.actions.enterprise-storage-ha-backups %}
1. Enable {% data variables.product.prodname_actions %} on the replacement appliance. This will connect the replacement appliance to the same external storage for {% data variables.product.prodname_actions %}.
## Restoring a backup of {% data variables.product.product_name %} when {% data variables.product.prodname_actions %} is enabled
```shell
ghe-config app.actions.enabled true
ghe-config-apply
```
To restore a backup of {% data variables.product.product_location %} with {% data variables.product.prodname_actions %}, you must manually configure network settings and external storage on the destination instance before you restore your backup from {% data variables.product.prodname_enterprise_backup_utilities %}.
1. After {% data variables.product.prodname_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](/admin/configuration/configuring-backups-on-your-appliance#restoring-a-backup)."
1. Re-register your self-hosted runners on the replacement appliance. For more information, see [Adding self-hosted runners](/actions/hosting-your-own-runners/adding-self-hosted-runners).
1. Confirm that the source instance is offline.
1. Manually configure network settings on the replacement {% data variables.product.prodname_ghe_server %} instance. Network settings are excluded from the backup snapshot, and are not overwritten by `ghe-restore`. For more information, see "[Configuring network settings](/admin/configuration/configuring-network-settings)."
1. SSH into the destination instance. For more information, see "[Accessing the administrative shell (SSH)](/admin/configuration/accessing-the-administrative-shell-ssh)."
For more information on backing up and restoring {% data variables.product.prodname_ghe_server %}, see "[Configuring backups on your appliance](/admin/configuration/configuring-backups-on-your-appliance)."
```shell{:copy}
$ ssh -p 122 admin@HOSTNAME
```
1. Configure the destination instance to use the same external storage service for {% data variables.product.prodname_actions %} as the source instance by entering one of the following commands.
{% indented_data_reference reusables.actions.configure-storage-provider-platform-commands spaces=3 %}
{% data reusables.actions.configure-storage-provider %}
1. To prepare to enable {% data variables.product.prodname_actions %} on the destination instance, enter the following command.
```shell{:copy}
ghe-config app.actions.enabled true
```
{% data reusables.actions.apply-configuration-and-enable %}
1. After {% data variables.product.prodname_actions %} is configured and enabled, to restore the rest of the data from the backup, use the `ghe-restore` command. For more information, see "[Restoring a backup](/admin/configuration/configuring-backups-on-your-appliance#restoring-a-backup)."
1. Re-register your self-hosted runners on the destination instance. For more information, see "[Adding self-hosted runners](/actions/hosting-your-own-runners/adding-self-hosted-runners)."