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

database migration for qa #157

Closed
6 tasks
kayiwa opened this issue Oct 23, 2023 · 2 comments
Closed
6 tasks

database migration for qa #157

kayiwa opened this issue Oct 23, 2023 · 2 comments
Assignees
Labels
chore A task that doesn't require points tracking

Comments

@kayiwa
Copy link
Collaborator

kayiwa commented Oct 23, 2023

database dump

  • stop webserver connections
    sudo systemctl stop nginx
  • drop database
    pg_dump --format custom --clean --no-owner --no-privileges cdh_geniza > 2023_10_25_cdh_geniza.dump
  • transfer database (as pulsys)
    sudo mv /var/lib/postgresql/2023_10_25_cdh_geniza.dump .
    scp 2023_10_25_cdh_geniza.dump lib-postgres-prod1:~
  • run a db_setup playbook
  • import database from new host
    sudo mv 2023_10_25_cdh_geniza.dump /var/lib/postgresql
    pg_restore -h 127.0.0.1 -U cdh_geniza --dbname cdh_geniza --no-owner --no-privileges 2023_10_25_cdh_geniza.dump
  • restart webserver connection
    sudo systemctl start nginx
@kayiwa kayiwa added the chore A task that doesn't require points tracking label Oct 23, 2023
@rlskoeser
Copy link
Contributor

@kayiwa is there anything we should document here before we close this issue?

@rlskoeser
Copy link
Contributor

this was completed in November

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore A task that doesn't require points tracking
Projects
None yet
Development

No branches or pull requests

2 participants