You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if [[ $ac_db_ghe-gt 0 &&$ac_db_snapshot-eq 0 ]];then
321
-
echo"$GHE_HOSTNAME has Actions Cache service enabled but no Actions Cache data is present in snapshot to restore. Aborting \n Please disable Actions cache service in $GHE_HOSTNAME and retry\nTo disable Actions Cache service run as admin: ghe-actions-cache-disable"1>&2
321
+
log_error"$GHE_HOSTNAME has Actions Cache service enabled but no Actions Cache data is present in snapshot to restore. Aborting \n Please disable Actions cache service in $GHE_HOSTNAME and retry\nTo disable Actions Cache service run as admin: ghe-actions-cache-disable"1>&2
322
322
exit 1
323
323
fi
324
324
if [[ $ac_db_ghe-eq 0 &&$ac_db_snapshot-gt 0 &&!$RESTORE_SETTINGS ]];then
325
-
echo"$GHE_HOSTNAME has Actions Cache service disabled but the snapshot is attempting to restore data for the service. Aborting. \n Please enable Actions cache service in $GHE_HOSTNAME and retry \n To enable Actions Cache service run as admin: ghe-actions-cache-enable"1>&2
325
+
log_error"$GHE_HOSTNAME has Actions Cache service disabled but the snapshot is attempting to restore data for the service. Aborting. \n Please enable Actions cache service in $GHE_HOSTNAME and retry \n To enable Actions Cache service run as admin: ghe-actions-cache-enable"1>&2
326
326
exit 1
327
327
fi
328
328
else
329
-
echo"$GHE_HOSTNAME must have GitHub Actions enabled before restoring since the snapshot contains Actions data. Aborting. \n Setup details for enabling Actions can be found here: https://docs.github.com/en/enterprise-server@$RELEASE_VERSION/admin/github-actions/advanced-configuration-and-troubleshooting/backing-up-and-restoring-github-enterprise-server-with-github-actions-enabled"1>&2
329
+
log_error"$GHE_HOSTNAME must have GitHub Actions enabled before restoring since the snapshot contains Actions data. Aborting. \n Setup details for enabling Actions can be found here: https://docs.github.com/en/enterprise-server@$RELEASE_VERSION/admin/github-actions/advanced-configuration-and-troubleshooting/backing-up-and-restoring-github-enterprise-server-with-github-actions-enabled"1>&2
330
330
exit 1
331
331
fi
332
332
fi
@@ -335,40 +335,40 @@ fi
335
335
bm_init > /dev/null
336
336
337
337
ghe-backup-store-version ||
338
-
echo"Warning: storing backup-utils version remotely failed."
338
+
log_warn"Warning: storing backup-utils version remotely failed."
339
339
340
340
# Stop cron and timerd, as scheduled jobs may disrupt the restore process.
341
-
echo"Stopping cron and github-timerd ..."
341
+
log_info"Stopping cron and github-timerd ..."
342
342
if$CLUSTER;then
343
343
if! ghe-ssh "$GHE_HOSTNAME" -- "ghe-cluster-each -- sudo service cron stop";then
344
-
ghe_verbose "* Warning: Failed to stop cron on one or more nodes"
344
+
log_warn "Failed to stop cron on one or more nodes"1>&3
345
345
fi
346
346
347
347
if [ "$GHE_VERSION_MAJOR"-eq"3" ];then
348
348
if ghe-ssh "$GHE_HOSTNAME" -- "systemctl -q is-active nomad && nomad job status --short github-timerd &>/dev/null";then
if is_external_database_target_or_snapshot &&$SKIP_MYSQL;then
418
-
echo"Skipping MySQL restore."
418
+
log_info"Skipping MySQL restore."
419
419
else
420
-
echo"Restoring MySQL database from ${backup_snapshot_strategy} backup snapshot on an appliance configured for ${appliance_strategy} backups ..."
420
+
log_info"Restoring MySQL database from ${backup_snapshot_strategy} backup snapshot on an appliance configured for ${appliance_strategy} backups ..."
421
421
ghe-restore-mysql "$GHE_HOSTNAME"1>&3
422
422
fi
423
423
424
424
if ghe-ssh "$GHE_HOSTNAME" -- 'ghe-config --true app.actions.enabled';then
425
-
echo"Stopping Actions before restoring databases ..."
425
+
log_info"Stopping Actions before restoring databases ..."
426
426
# We mark Actions as stopped even if the `ghe-actions-stop`
427
427
# fails to ensure that we cleanly start actions when performing cleanup.
428
428
ACTIONS_STOPPED=true
429
429
ghe-ssh "$GHE_HOSTNAME" -- 'ghe-actions-stop'1>&3
430
430
431
-
echo"Restoring MSSQL databases ..."
431
+
log_info"Restoring MSSQL databases ..."
432
432
ghe-restore-mssql "$GHE_HOSTNAME"1>&3
433
433
434
-
echo"Restoring Actions data ..."
434
+
log_info"Restoring Actions data ..."
435
435
ghe-restore-actions "$GHE_HOSTNAME"1>&3
436
436
echo"* WARNING: Every self-hosted Actions runner that communicates with the restored GHES server must be restarted or reconfigured in order to continue functioning. \n See https://docs.github.com/en/actions/hosting-your-own-runners/adding-self-hosted-runners for more details on how to reconfigure self-hosted Actions runners."
437
437
fi
438
438
439
439
if ghe-ssh "$GHE_HOSTNAME" -- 'ghe-config --true app.minio.enabled';then
0 commit comments