Skip to content

snapshot: add pg_dump command builder with 'snapshot databases'#889

Merged
bobheadxi merged 5 commits into
mainfrom
src-snapshot-pgdump-templater
Nov 28, 2022
Merged

snapshot: add pg_dump command builder with 'snapshot databases'#889
bobheadxi merged 5 commits into
mainfrom
src-snapshot-pgdump-templater

Conversation

@bobheadxi

@bobheadxi bobheadxi commented Nov 26, 2022

Copy link
Copy Markdown
Member

Add simple utility for generating commands that can then be run/modified to create database dumps.

Right now, it's mostly for reference - as we build experience with different setups we can see if this can be made more flexible in the right ways. I believe a templating command like this is important to have, however, since we want to make sure all databases are exported and the correct flags are used with pg_dump, and documentation + manual copy-paste is error-prone.

Closes https://github.com/sourcegraph/customer/issues/1611 for now.

Test plan

image

Also tested the kubectl commands on k8s.sgdev.org

@bobheadxi bobheadxi requested review from a team and michaellzc November 26, 2022 00:24
@bobheadxi bobheadxi force-pushed the src-snapshot-pgdump-templater branch from 383677c to e7a1e42 Compare November 26, 2022 00:25
@bobheadxi bobheadxi mentioned this pull request Nov 26, 2022
Comment thread cmd/src/snapshot_databases.go Outdated
Comment thread internal/pgdump/pgdump.go Outdated
@bobheadxi bobheadxi requested review from a team and michaellzc November 28, 2022 18:52
@bobheadxi

Copy link
Copy Markdown
Member Author

Current dependencies on/for this PR:

This comment was auto-generated by Graphite.

@bobheadxi bobheadxi merged commit 5d82eb0 into main Nov 28, 2022
@bobheadxi bobheadxi deleted the src-snapshot-pgdump-templater branch November 28, 2022 22:48
scjohns pushed a commit that referenced this pull request Apr 24, 2023
Add simple utility for generating commands that can then be run/modified to create database dumps.

Right now, it's mostly for reference - as we build experience with different setups we can see if this can be made more flexible in the right ways. I believe a templating command like this is important to have, however, since we want to make sure all databases are exported and the correct flags are used with pg_dump, and documentation + manual copy-paste is error-prone.

Co-authored-by: Michael Lin <mlzc@hey.com>
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.

2 participants