Skip to content
This repository has been archived by the owner on Feb 14, 2024. It is now read-only.

Postgres backup and restore scripts #129

Merged
merged 19 commits into from
Jun 29, 2022
Merged

Postgres backup and restore scripts #129

merged 19 commits into from
Jun 29, 2022

Conversation

aloftus23
Copy link
Contributor

@aloftus23 aloftus23 commented Feb 1, 2022

🗣 Description

Created a postgres backup script called pg_backup.sh to be run in the environment with the P&E database. Backs up all data, tables, schemas, users and roles.

Also, created a restore script called pg_restore.sh to be run on developer computers.

README.md was updated with instructions.

fixes #113

💭 Motivation and context

P&E database needs to be backed-up on a regular basis with the ability for developers to restore it on their local environments easily.

🧪 Testing

Pre-commits and pytests pass.

✅ Pre-approval checklist

  • This PR has an informative and human-readable title.
  • Changes are limited to a single goal - eschew scope creep!
  • All relevant type-of-change labels have been added.
  • I have read the CONTRIBUTING document.
  • These code changes follow cisagov code standards.
  • All relevant repo and/or project documentation has been updated
    to reflect the changes in this PR.
  • All new and existing tests pass.

- add pg_backup and pg_restore scripts to allow P&E team to regularly backup and then restore the db locally
- added instructions to the readme
- add pg_backup and pg_restore scripts to allow P&E team to regularly backup and then restore the db locally
- added instructions to the readme
@aloftus23 aloftus23 added the improvement This issue or pull request will add or improve functionality, maintainability, or ease of use label Feb 1, 2022
@aloftus23 aloftus23 added this to PR in Sprint 9 (1/16 - 3/1) via automation Feb 1, 2022
@aloftus23 aloftus23 self-assigned this Feb 1, 2022
@coveralls
Copy link

coveralls commented Feb 1, 2022

Coverage Status

Coverage remained the same at 18.236% when pulling abc3756 on AL-db-backup into 7b1fb83 on develop.

@cduhn17 cduhn17 marked this pull request as ready for review April 21, 2022 13:50
@stewartl97 stewartl97 added this to In progress in Backlog via automation May 18, 2022
Copy link
Contributor

@DJensen94 DJensen94 left a comment

Choose a reason for hiding this comment

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

Looks good

@stewartl97 stewartl97 moved this from In progress to Done in Backlog Jun 21, 2022
@stewartl97 stewartl97 moved this from Done to PR in Backlog Jun 21, 2022
@cduhn17
Copy link
Collaborator

cduhn17 commented Jun 27, 2022

@dav3r ,

Do you have an idea of when you might have some time to take a look at this PR? Thanks

@aloftus23
Copy link
Contributor Author

Resolved the merged conflicts. Ready for review

Copy link
Member

@dav3r dav3r left a comment

Choose a reason for hiding this comment

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

Please take a look at my feedback and let me know if you have any questions.

README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Show resolved Hide resolved
src/pe_reports/pe_db/pg_backup.sh Outdated Show resolved Hide resolved
src/pe_reports/pe_db/pg_restore.sh Outdated Show resolved Hide resolved
src/pe_reports/pe_db/pg_backup.sh Outdated Show resolved Hide resolved
src/pe_reports/pe_db/pg_backup.sh Show resolved Hide resolved
src/pe_reports/pe_db/pg_restore.sh Show resolved Hide resolved
@dav3r
Copy link
Member

dav3r commented Jun 28, 2022

@aloftus23 - Please also make sure that you check all remaining applicable checkboxes in this PR's "Pre-approval checklist" and delete any that are not applicable to this PR. Generally, we expect that all of those checkboxes have been checked (or deleted) prior to requesting approval.

README.md Outdated Show resolved Hide resolved
Copy link
Member

@dav3r dav3r left a comment

Choose a reason for hiding this comment

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

Thanks for taking my feedback into consideration! Once my last quibble is resolved, this PR looks great to me. ☘️

Co-authored-by: dav3r <david.redmin@trio.dhs.gov>
@cduhn17 cduhn17 merged commit 1620c63 into develop Jun 29, 2022
@cduhn17 cduhn17 deleted the AL-db-backup branch June 29, 2022 15:20
Backlog automation moved this from PR to Done Jun 29, 2022
cisagovbot pushed a commit that referenced this pull request Apr 26, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
improvement This issue or pull request will add or improve functionality, maintainability, or ease of use
Projects
Development

Successfully merging this pull request may close these issues.

Identify Way to Backup Postgres Database For Easy Loading Onto Each Developer Computer
5 participants