Merge lp://qastaging/~mwhudson/lava-lab/add-import-db into lp://qastaging/~linaro-validation/lava-lab/trunk

Proposed by Michael Hudson-Doyle
Status: Merged
Merged at revision: 2
Proposed branch: lp://qastaging/~mwhudson/lava-lab/add-import-db
Merge into: lp://qastaging/~linaro-validation/lava-lab/trunk
Diff against target: 28 lines (+24/-0)
1 file modified
scripts/import-db.sh (+24/-0)
To merge this branch: bzr merge lp://qastaging/~mwhudson/lava-lab/add-import-db
Reviewer Review Type Date Requested Status
Paul Larson (community) Approve
Review via email: mp+82342@code.qastaging.launchpad.net

Description of the change

Hi, this branch adds a script that you can use to restore a production db dump into an instance created by lp:lava-deployment-tool. You have to run it from the directory containing the instance. The flags passed to pg_restore were mostly determined by trial and error :-)

To post a comment you must log in.
Revision history for this message
Paul Larson (pwlars) wrote :

Well, that could come in handy someday :)
+1

This should work with the database backups we already do, and with some minor tweaking, also work if you wanted to do a db restore for hacking in any non-lava-deployment-tool created virtualenv right?

review: Approve
Revision history for this message
Michael Hudson-Doyle (mwhudson) wrote :

It certainly works with the database backups we already do, that's what I was testing with :-)

The only part that is lava-deployment-tool specific really is the call to migrate. Oh, and there's an assumption that the database is owned by a user with the same name.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches