Skip to content

Upgrading to FromThePage 2

Ben W. Brumfield edited this page Oct 16, 2015 · 3 revisions

Prerequisites

You'll need to make sure your server supports Ruby 2 and Rails 4 in advance. (See the installation documents for background.) For more recent installations, this should not be an issue.

In addition, you'll need some way of sending email from the system so that users will know when uploads have been processed. See action mailer configuration. (FromThePage.com uses Mandrill.com for its mail delivery.)

Migrating Data

  1. Pull the latest code into your installation: git pull from the master branch
  2. Migrate the database: rake db:migrate
  3. Recompile your assets: rake assets:precompile
  4. Restart your server: touch tmp/restart.txt

Checking Configuration

FromThePage 2 includes new rake tasks to check server configuration.

  • rake fromthepage:check_installation_config will look for common installation problems affecting background task processing, graph generation, and image uploads.
  • rake fromthepage:check_email_config[[email protected]] will test the configuration needed to send email, and--if successful--will send email to the address you specify.

Testing Migration

If your FromThePage installation is in use, it's highly recommended that you do a dry run with a copy of your data.

  1. Clone the master branch into a staging machine or a new directory on your server.
  2. Copy the existing database: mysqldump --user=username --password=password old_production_database > /tmp/copy_of_production.dmp; mysql --user=username --password=password --database=new_staging_database < /tmp/copy_of_production.dmp.
  3. Copy or symlink the image files: cp -r /old_location/fromthepage/public/images/working/* /new_location/fromthepage/public/images/working

Migrating Servers

If you're migrating FromThePage from an older server to a newer server as part of the upgrade, we recommend these steps:

  1. Install a blank version of FromThePage on the new server from scratch.
  2. Copy the public/images/working directory from the old server to the new server
  3. Export the database from your old server
  4. Import the database into your new server
  5. Follow the steps above for migrating data and checking configuration
  6. Switch your DNS to point to the new server.