Skip to content

Instantly share code, notes, and snippets.

@mikeschinkel
Last active January 22, 2020 06:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mikeschinkel/6673f08a93c52061ed699178cc2edb79 to your computer and use it in GitHub Desktop.
Save mikeschinkel/6673f08a93c52061ed699178cc2edb79 to your computer and use it in GitHub Desktop.
Import script for Pantheon DB from mysite1.live to mysite2.live (does this work?)
#!/usr/bin/env bash
db_file="$(terminus backup:list mysite1.live | grep -m1 database.sql.gz | awk '{print $1}')"
db_url="$(terminus backup:get mckissock.live --element=db --file="${db_file}")"
terminus import:db --yes mysite2.live "${db_url}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment