Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: add steps for setting site permissions before pull_site_from_xxx scripts

...

  • You need to have ssh keys set up so you can get to the other machine without a password prompt
  • one easy way to do this is set up the drush command 'pushkey'
    • read all about it: https://www.drupal.org/project/drush_extras
    • PUSHKEY
      
          drush pushkey user@host.domain.com
      
      	Creates an ssh public/private key pair in $HOME/.ssh, if
      	one does not already exist, and then pushes the public
      	key to the specified remote account.  The password for the
      	destination account must be entered once to push the
      	key over; after the key has been stored on the remote
      	system, subsequent ssh and remote drush commands may be
      	executed using the public/private key pair for authentication.
      
      	IN DRUSH EXTRAS because is is Linux / openssl-specific.
              
    • install it in your user's drush
      • log in to victoria02
      • drush dl drush_extras
    • use it

How to move from production to testget the latest versions of the scripts

  • log in to victoria02
  • grab the new scripts from github
    • cd ~
    • git clone git@github.com:cul-it/drupal-site-moves.git
    • cd ~/drupal-site-moves
    • git pull

How to set permissions on a site

  • log in to the server where the site is via ssh
  • get the latest versions of the scripts
  • ~/drupal-site-moves/set_permissions.sh <site name>

How to move from production to test

  • Set permissions for the production site on the production machine
  • Set permissions on test site on the test machine
  • while logged in to the test machine:
    • ~/drupal-site-moves/pull_site_from_production.sh <production site name> <test site name>
  • you are prompted for your password
  • you are asked to confirm the site move
  • you are asked to inform the site users that you are working on the site on the test server
    • put up the 'Site Under Maintenance' block
  • script continues on without requiring any input from you
    • backs up the database
    • moves the site files to the target server
    • installs the backed up database on the target server
  • done

...

How to move from test to production

  • Set permissions for the test site on the test machine
  • Set permissions on production site on the production machine
  • while logged in to the production machine:
  • log in to victoria01 or victoria03
  • grab the new scripts from github
    • cd ~
    • git clone git@github.com:cul-it/drupal-site-moves.git
    • cd ~/drupal-site-moves
    • git pull
    • ~/drupal-site-moves/pull_site_from_test.sh <test site name> <production site name>
  • you are prompted for your password

  • you are asked to confirm the site move
  • you are asked to confirm again
    • you can take down the 'Site Under Maintenance' block while the site is still on the test server
  • script continues on without requiring any input from you
    • backs up the database
    • moves the site files to the target server
    • installs the backed up database on the target server
  • done

...