You can use GitHub Enterprise Server Backup Utilities to back up and restore the data and configuration for your GitHub Enterprise Server instance to a new instance. For more information, see "
Configuring backups on your instance
."
However, not all the data for GitHub Actions is included in these backups. GitHub Actions uses external storage to store workflow artifacts and logs. This data is stored on your external provider, such as Azure blob storage, Amazon S3, Google Cloud Storage, or MinIO. As a result, GitHub Enterprise Server backups and GitHub Enterprise Server high availability configurations do not provide protection for the data stored on this external storage, and instead rely on the data protection and replication provided by the external storage provider, such as Azure, Google Cloud, or AWS.
To restore a backup of your GitHub Enterprise Server instance 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.
-
Confirm that the source instance is offline.
-
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
."
-
SSH into the destination instance. For more information, see "
Accessing the administrative shell (SSH)
."
Shell
ssh -p 122 admin@HOSTNAME
ssh -p 122 admin@HOSTNAME
-
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"
ghe-config secrets.actions.storage.blob-provider "azure"
-
Amazon S3:
Shell
ghe-config secrets.actions.storage.blob-provider "s3"
ghe-config secrets.actions.storage.blob-provider "s3"
-
Google Cloud Storage:
Shell
ghe-config secrets.actions.storage.blob-provider "gcs"
ghe-config secrets.actions.storage.blob-provider "gcs"
-
Configure the external storage connection by entering the following commands, replacing the placeholder values with actual values for your connection.
-
To prepare to enable GitHub Actions on the destination instance, enter the following command.
Shell
ghe-config app.actions.enabled true
ghe-config app.actions.enabled true
-
To apply the configuration and enable GitHub Actions to connect to your external storage provider, enter the following command.
-
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 "
Configuring backups on your instance
."
-
Re-register your self-hosted runners on the destination instance. For more information, see "
Adding self-hosted runners
."
-
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'
ghe-config --unset 'app.actions.actions-repos-sha1sum'
-
To apply the configuration, run the following command.
Note
: During a configuration run, services on your GitHub Enterprise Server instance may restart, which can cause brief downtime for users.
-
Wait for the configuration run to complete.