Skip to content
This repository has been archived by the owner on Mar 27, 2022. It is now read-only.

Upgrade by Copying Data

Tim Morgan edited this page Feb 8, 2015 · 4 revisions

You may find yourself in the situation of wanting/needing to install OneBody from scratch, using one of the many techniques on the Installation page. But what about your existing data?

You can just copy it over! The two place where your data exist are:

Location Type of Data
MySQL Database people, families, groups, messages, etc.
onebody/public/system photos, attachments, documents

Here's roughly what you need to do:

  1. Install OneBody fresh on your new server.

  2. Copy your database over:

    1. On the old server, mysqldump -uroot onebody > onebody.sql
    2. Copy the sql file to the new server.
    3. On the new server (be sure!), delete and recreate the database: RAILS_ENV=production rake db:drop db:create
    4. mysql -uroot onebody < onebody.sql.
  3. Copy everything in the public/system folder over to the new server.

  4. Run the database migrations:

    RAILS_ENV=production rake db:migrate