mirror of
https://github.com/getsentry/self-hosted.git
synced 2025-12-08 19:46:14 +00:00
Fixes https://github.com/getsentry/self-hosted/issues/3526 Previously, if this was executed: ```bash ./scripts/backup.sh --no-report-self-hosted-issues ``` The final backup command that will be executed is: ```bash docker compose run -v "${PWD}/sentry:/sentry-data/backup" --rm -T -e SENTRY_LOG_LEVEL=CRITICAL web export --no-report-self-hosted-issues /sentry-data/backup/backup.json ``` Which is invalid. This PR strips all known flags specific to self-hosted before passing it onto Sentry. One other option is to enable "ignore unknown options" on click (the CLI dependency) on Sentry, but I don't want to go to that route.
19 lines
414 B
Bash
Executable File
19 lines
414 B
Bash
Executable File
#!/usr/bin/env bash
|
|
MINIMIZE_DOWNTIME="${MINIMIZE_DOWNTIME:-}"
|
|
REPORT_SELF_HOSTED_ISSUES="${REPORT_SELF_HOSTED_ISSUES:-}"
|
|
|
|
while (($#)); do
|
|
case "$1" in
|
|
--report-self-hosted-issues) REPORT_SELF_HOSTED_ISSUES=1 ;;
|
|
--no-report-self-hosted-issues) REPORT_SELF_HOSTED_ISSUES=0 ;;
|
|
--minimize-downtime) MINIMIZE_DOWNTIME=1 ;;
|
|
*) version=$1 ;;
|
|
esac
|
|
shift
|
|
done
|
|
|
|
cmd="restore $1"
|
|
source scripts/_lib.sh
|
|
|
|
$cmd
|