@@ -27,7 +27,7 @@ ghe_remote_version_required "$GHE_HOSTNAME"
27
27
export GHE_RESTORE_SNAPSHOT
28
28
29
29
# The directory holding the snapshot to restore
30
- snapshot_dir =" $GHE_DATA_DIR /$GHE_RESTORE_SNAPSHOT "
30
+ GHE_RESTORE_SNAPSHOT_PATH =" $GHE_DATA_DIR /$GHE_RESTORE_SNAPSHOT "
31
31
32
32
if is_external_database_snapshot; then
33
33
if [ -n " $EXTERNAL_DATABASE_RESTORE_SCRIPT " ]; then
@@ -40,7 +40,7 @@ if is_external_database_snapshot; then
40
40
bm_end " $( basename $0 ) "
41
41
exit 0
42
42
else
43
- if is_binary_backup " $snapshot_dir " ; then
43
+ if is_binary_backup " $GHE_RESTORE_SNAPSHOT_PATH " ; then
44
44
echo " Error: Restore of a binary backup to appliance with an external database configured is not supported."
45
45
echo " Please provide a custom external database restore script with EXTERNAL_DATABASE_RESTORE_SCRIPT"
46
46
exit 1
@@ -63,18 +63,22 @@ if is_external_database_snapshot; then
63
63
fi
64
64
65
65
if is_binary_backup_feature_on; then
66
+ # Always restore the password pepper here since it is tied to the MySQL data.
67
+ restore-secret " password pepper" " password-pepper" " secrets.github.user-password-secrets"
66
68
# Feature "mysql.backup.binary" is on, which means new backup scripts are available
67
- if is_binary_backup " $snapshot_dir " ; then
69
+ if is_binary_backup " $GHE_RESTORE_SNAPSHOT_PATH " ; then
68
70
ghe-restore-mysql-binary $GHE_HOSTNAME
69
71
else
70
72
ghe-restore-mysql-logical $GHE_HOSTNAME
71
73
fi
72
74
else
73
75
# We do not allow to restore binary backup without "mysql.backup.binary" set
74
- if is_binary_backup " $snapshot_dir " ; then
76
+ if is_binary_backup " $GHE_RESTORE_SNAPSHOT_PATH " ; then
75
77
echo " To restore from a binary backup, you have to set ghe-config \" mysql.backup.binary\" to true" >&2
76
78
exit 2
77
79
else
80
+ # Always restore the password pepper here since it is tied to the MySQL data.
81
+ restore-secret " password pepper" " password-pepper" " secrets.github.user-password-secrets"
78
82
if is_default_external_database_snapshot; then
79
83
ghe-restore-mysql-logical $GHE_HOSTNAME
80
84
else
0 commit comments