Thumbnail

Export a GovCMS database and import it locally

Thumbnail

Si Hobbs

|

Get your latest database out of GovCMS and import it locally.

Find your environment

Assuming that you've logged in to a project called acme, you can access your environment at 

https://dashboard.govcms.gov.au/projects/acme

In the image, you can see a branch feature/donuts has created an environment of the same name. This is the one we want to get a database from.

 

feature-donuts.png

Find the Tasks

After clicking on the environment, and clicking on Tasks, the URL should be something like:

https://dashboard.govcms.gov.au/projects/acme/acme-feature-donuts/tasks

 

govcms-tasks.png

Generate the database dump

The next step is to generate a database dump by selecting Generate Database Dump and clicking Add Task

govcms-add-task.png

Download the database dump

You'll need to wait a few minutes (no more than 10 usually) for the database dump to be generated. On the same page you will see when it has been generating by the appearance of a green tick.

You can now click on the database dump and see a download link. Download the file.

govcms-download-dump.png

Import to your local site

Assuming your local development site is running, you can now import this database dump. The easiest way to do this is to run ahoy mysql-import ~/Downloads/path-to-file.sql (using the correct file name that you downloaded in the previous step).

Under the hood this is running something like cat dump.sql | drush sqlc - but handles the docker and container abstraction so that you don't have to.

govcms-ahoy-import.png

Add new comment

The content of this field is kept private and will not be shown publicly.

Plain text

  • No HTML tags allowed.
  • Lines and paragraphs break automatically.
  • Web page addresses and email addresses turn into links automatically.

Comments

  • Allowed HTML tags: <em> <strong> <cite> <blockquote cite> <ul type> <ol start type> <li> <dl> <dt> <dd> <p>
  • Lines and paragraphs break automatically.
  • Web page addresses and email addresses turn into links automatically.
  • Use [gist:#####] where ##### is your gist number to embed the gist
    You may also include a specific file within a multi-file gist with [gist:####:my_file].

Spread the word