Skip to content

Commit 6cb2b67

Browse files
committed
Do not require customer to use standard output for backup script
1 parent 956d127 commit 6cb2b67

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

share/github-backup-utils/ghe-backup-mysql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ ghe_remote_version_required "$GHE_HOSTNAME"
1818
if is_service_external 'mysql'; then
1919
echo "Backing up external MySQL database using customer-provided script..."
2020
if [ -n "$EXTERNAL_DATABASE_BACKUP_SCRIPT" ]; then
21-
$EXTERNAL_DATABASE_BACKUP_SCRIPT > "$GHE_SNAPSHOT_DIR/mysql.sql.gz"
21+
$EXTERNAL_DATABASE_BACKUP_SCRIPT
2222
else
2323
echo "Error: EXTERNAL_DATABASE_BACKUP_SCRIPT is not configured. Please configure in backup.config."
2424
exit 1

share/github-backup-utils/ghe-restore-mysql

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,12 @@ snapshot_dir="$GHE_DATA_DIR/$GHE_RESTORE_SNAPSHOT"
3030

3131
# When customer uses external database, we rely on customer to implement the restore process
3232
if is_service_external 'mysql' "$snapshot_dir/settings.json"; then
33-
echo "Restore external MySQL database using customer-provided script ..."
34-
$EXTERNAL_DATABASE_RESTORE_SCRIPT
33+
if [ -n "$EXTERNAL_DATABASE_RESTORE_SCRIPT" ]; then
34+
$EXTERNAL_DATABASE_RESTORE_SCRIPT
35+
else
36+
echo "Error: EXTERNAL_DATABASE_RESTORE_SCRIPT is not configured. Please configure in backup.config."
37+
exit 1
38+
fi
3539
else
3640
ssh_config_file_opt=
3741
if is_binary_backup_feature_on; then

0 commit comments

Comments
 (0)