File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -11,13 +11,17 @@ echo "Creating backup..."
1111touch $( pwd) /sentry/backup.json
1212chmod 666 $( pwd) /sentry/backup.json
1313# Command here matches exactly what we have in our docs https://develop.sentry.dev/self-hosted/backup/#backup
14- $dc run -v $( pwd) /sentry:/sentry-data/backup --rm -T -e SENTRY_LOG_LEVEL=CRITICAL web export /sentry-data/backup/backup.json
14+ $dc run -v $( pwd) /sentry:/sentry-data/backup --rm -T -e SENTRY_LOG_LEVEL=CRITICAL web export global /sentry-data/backup/backup.json
1515# Check to make sure there is content in the file
1616if [ ! -s " $( pwd) /sentry/backup.json" ]; then
1717 echo " Backup file is empty"
1818 exit 1
1919fi
2020
21+ # Print backup.json contents
22+ echo " Backup file contents:\n\n"
23+ cat " $( pwd) /sentry/backup.json"
24+
2125# Bring postgres down and recreate the docker volume
2226$dc stop postgres
2327sleep 5
@@ -29,6 +33,6 @@ source install/set-up-and-migrate-database.sh
2933$dc up -d
3034
3135echo " Importing backup..."
32- $dc run --rm -T web import /etc/sentry/backup.json
36+ $dc run --rm -T web import global /etc/sentry/backup.json
3337
3438rm $( pwd) /sentry/backup.json
Original file line number Diff line number Diff line change @@ -62,11 +62,11 @@ function reset() {
6262function backup() {
6363 touch $( pwd) /sentry/backup.json
6464 chmod 666 $( pwd) /sentry/backup.json
65- $dc run -v $( pwd) /sentry:/sentry-data/backup --rm -T -e SENTRY_LOG_LEVEL=CRITICAL web export /sentry-data/backup/backup.json
65+ $dc run -v $( pwd) /sentry:/sentry-data/backup --rm -T -e SENTRY_LOG_LEVEL=CRITICAL web export global /sentry-data/backup/backup.json
6666}
6767
6868function restore() {
69- $dc run --rm -T web import /etc/sentry/backup.json
69+ $dc run --rm -T web import global /etc/sentry/backup.json
7070}
7171
7272# Needed variables to source error-handling script
You can’t perform that action at this time.
0 commit comments