Skip to content

DIGITAL-725 - small fixes/enhancements for the download_backup, and s3 credentials scripts#418

Open
arpage wants to merge 5 commits into
developfrom
feature/DIGITAL-725-db-backup-scripts
Open

DIGITAL-725 - small fixes/enhancements for the download_backup, and s3 credentials scripts#418
arpage wants to merge 5 commits into
developfrom
feature/DIGITAL-725-db-backup-scripts

Conversation

@arpage
Copy link
Copy Markdown
Contributor

@arpage arpage commented Apr 10, 2026

Jira ticket

DIGITAL-725

Purpose

Small fixes and enhancements

  1. Change variable name from "bucket name" to "service name" to clarify that we are accessing the CF service which contains the bucket name
  2. Allow the s3 credentials script to take a command line argument. If the argument is not present, try the environment variable. Env var name also changed per the above point
  3. Add descriptive progress output and error messages (preparing to remove set -e in order to specifically handle errors, rather than have an uncontrolled exit).
  4. download_backup.sh now calls cloud-gov-s3-cred.sh instead of polling CF for the information
  5. Add dev-specific GitHub action for db backup (not scheduled, for now)
  6. Add dev-specific GitHub action for db restore

Deployment and testing

The actions are untested as of now - once this is deployed to github actions, we can create a new ticket for testing and enhancing the dev backup and restore actions.

Local Setup

You do not need to have the site built locally to test this PR. Just have this branch pulled and up to date: feature/DIGITAL-725-db-backup-scripts

QA/Testing instructions

To test the download_backup.sh script (which implicitly tests the s3 credentials script),

cf  target -s dev
scripts/download_backup.sh -s dev -d latest -c  $(cf services | grep s3 | sed 's/s3.*//' | grep backup)
ls -l latest.sql*

You should end up with the latest backup file from dev (as of now dated March 10).

Checklist for the Developer

  • A link to the JIRA ticket has been included above.
  • No merge conflicts exist with the target branch.
  • Automated tests have passed on this PR.
  • A reviewer has been designated.
  • Deployment and testing steps have been documented above, if applicable.

Checklist for the Peer Reviewers

  • The file changes are relevant to the task objective.
  • Code is readable and includes appropriate commenting.
  • Code standards and best practices are followed.
  • QA/Test steps were successfully completed, if applicable.
  • Applicable logs are free of errors.

@arpage arpage requested a review from akf April 28, 2026 15:16
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.

1 participant