pulibrary / pul-it-handbook

Princeton Univ. Library Apps best practices and recommendations
BSD 3-Clause "New" or "Revised" License
10 stars 1 forks source link

Document how to create a dump file from production DB and restore the staging DB #276

Closed christinach closed 6 months ago

christinach commented 6 months ago

Why is this documentation needed?

Sometimes we might need to dump data from production DB and upload them on staging DB. We came across an issue in DSS where the staging database was empty. We had to use a dump file from production and load the data on staging. We came across various permission issues and did extra work restoring a dump using restic then pulling the .sql locally , changing the dss_production instances in the sql file, scp the file on lib-postgres-staging and coming across various permissions issues using different pg_restore commands.

Acceptance criteria

Implementation notes, if any

See notes in https://github.com/pulibrary/DSS/issues/418#issuecomment-2065214180

See documentation for bibdata