Skip to main content
Last Reviewed: December 12, 2022

Prepare


Prepare the Local Environment

  1. Get a local copy of both your new site (from the external repository) and your existing site codebase.

  2. In the Dev tab of the site's Dashboard, set the Development Mode to Git, and clone the site locally.

  3. Change into the $SITE directory, then create a new branch based on the default:

    cd $SITE
    git checkout -b drup-upg-latest
  4. Use Terminus and Drush to export the latest version of the config files from the production environment to sites/default/files/config:

    terminus drush $SITE.live -- config:export --destination sites/default/files/config
  5. For rsync, copy the SFTP host information.

    RSYNC_HOST=$(terminus connection:info $SITE.live --field=sftp_host)
  6. Use that host name to rsync from config:export:

    rsync -rvlz --copy-unsafe-links --size-only --checksum --ipv4 --progress -e 'ssh -p 2222' "${RSYNC_HOST}:files/config" .
  7. If you run git status it should display changed files in the config directory if there are any changed configurations in production.

    git status