Skip to content

Commit

Permalink
fix(restore-db): don't exclude audit schema by default
Browse files Browse the repository at this point in the history
  • Loading branch information
achauve committed Oct 31, 2023
1 parent 3abeabb commit a43e3b7
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions plugins/contrib/jobs/pg-restore/restore-db.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ PGPORT=${PGPORT:-5432}
MOUNT_PATH=${MOUNT_PATH:-""}
if [ -n "$MOUNT_PATH" ]; then
FILTER_PATH=${FILTER_PATH:-".*"}
export LATEST=$(ls -1FR | grep -E "[0-9]{4}_[0-9]{2}_[0-9]{2}_${FILTER_PATH}" | sort -r | head -n 1);
export LATEST=$(ls -1FR "$MOUNT_PATH" | grep -E "[0-9]{4}_[0-9]{2}_[0-9]{2}_${FILTER_PATH}" | sort -r | head -n 1);
if [[ ${MOUNT_PATH:length-1:1} != "/" ]]; then
export MOUNT_PATH="$MOUNT_PATH/"
fi
Expand All @@ -38,7 +38,6 @@ set +e
pg_restore \
--dbname "$PGDATABASE" \
--clean --if-exists \
--exclude-schema=audit \
--no-owner \
--role "$OWNER" \
--no-acl \
Expand Down

0 comments on commit a43e3b7

Please sign in to comment.