Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add password in conn string for backup script #3467

Merged
merged 1 commit into from
Apr 12, 2022

Conversation

JerryHue
Copy link
Contributor

Issue This PR Addresses

Fixes #3459.

Type of Change

  • Bugfix: Change which fixes an issue
  • New Feature: Change which adds functionality
  • Documentation Update: Change which improves documentation
  • UI: Change which improves UI

Description

This PR adds the password to connect to Postgres through a connection string.

Steps to test the PR

  1. Start the services.
  2. Enter some information into a few tables.
  3. Login into the pg-backup-cron-job container (docker exec -it pg-backup-cron-job sh).
  4. Instead of waiting for the cron job to be executed, you may execute the file with the following command: /etc/periodic/daily/create-backup. After the command has been executed, there should be a file in /var/opt/pg_dumps, similar to 2022-04-08-02231.dump, make a note of its name.
  5. After getting the backup file, modify the database by deleting those tables with data.
  6. To restore those tables, run the restore-backup file with the following command: ./restore-backup /var/opt/pg_dumps/2022-04-08-02231.dump, for example.

Checklist

  • Quality: This PR builds and passes our npm test and works locally
  • Tests: This PR includes thorough tests or an explanation of why it does not
  • Screenshots: This PR includes screenshots or GIFs of the changes made or an explanation of why it does not (if applicable)
  • Documentation: This PR includes updated/added documentation to user exposed functionality or configuration variables are added/changed or an explanation of why it does not(if applicable)

@gitpod-io
Copy link

gitpod-io bot commented Apr 12, 2022

Copy link
Contributor

@humphd humphd left a comment

Choose a reason for hiding this comment

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

Nice

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.

pg-backup-cron-job not working
3 participants