Skip to content

Comments

ALCS-2471: Create script to sync and obfuscate PROD data#2231

Merged
dylanrogowsky-oxd merged 1 commit intodevelopfrom
feature/ALCS-2471-database-copy-script
Mar 21, 2025
Merged

ALCS-2471: Create script to sync and obfuscate PROD data#2231
dylanrogowsky-oxd merged 1 commit intodevelopfrom
feature/ALCS-2471-database-copy-script

Conversation

@dylanrogowsky-oxd
Copy link
Contributor

@dylanrogowsky-oxd dylanrogowsky-oxd commented Mar 17, 2025

A bash script, using the steps in Confluence to automate the dump, obfuscation using a new local database, and restore to DEV or TEST.

trslater
trslater previously approved these changes Mar 17, 2025
Copy link
Collaborator

@trslater trslater left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚀

@sonarqubecloud
Copy link

PORT_FORWARD_PID=$!

# Give port forwarding a moment to establish
sleep 6
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was changed from 2 to 6

PORT_FORWARD_PID=$!

# Give port forwarding a moment to establish
sleep 6
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was changed from 2 to 6

Comment on lines +335 to +342
# Drop ALCS and OATS schemas
echo "Dropping ALCS and OATS schemas..."
"$PG_TOOLS_PATH/psql" \
-h localhost \
-p $PORT \
-U postgres \
-d app \
-c "DROP SCHEMA IF EXISTS alcs CASCADE; DROP SCHEMA IF EXISTS oats CASCADE;"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was added due to constraint issues during pg_restore

@dylanrogowsky-oxd
Copy link
Contributor Author

@trslater - I made a 3 small changes after running it last night

Copy link
Collaborator

@trslater trslater left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚀

@dylanrogowsky-oxd dylanrogowsky-oxd merged commit 43cbb96 into develop Mar 21, 2025
8 checks passed
@dylanrogowsky-oxd dylanrogowsky-oxd deleted the feature/ALCS-2471-database-copy-script branch March 21, 2025 05:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants