Skip to content

Instantly share code, notes, and snippets.

@zmb3
Last active November 8, 2019 00:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save zmb3/f63bb10344bc2ae1580e55768d33b2f8 to your computer and use it in GitHub Desktop.
Save zmb3/f63bb10344bc2ae1580e55768d33b2f8 to your computer and use it in GitHub Desktop.
Backup/Restore Concourse DB
# from Concourse DB VM:
# backup
cd /var/vcap/packages/postgresql_9.3/bin
./pg_dump -U vcap -d atc --format=c --schema-only --file=concourse-schema.sql
./pg_dump -U vcap -d atc --format=c --data-only --file=concourse-data.sql
# restore
cd /var/vcap/packages/postgresql_9.3/bin
./pg_restore -U vcap -d atc -v concourse-schema.sql
./pg_restore -U vcap -d atc -v concourse-data.sql
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment