Migrating Canvas to another Server

518 views
Skip to first unread message

pchang

unread,
Sep 29, 2011, 7:01:35 AM9/29/11
to Canvas LMS Users
Is there a step by step guide in moving Canvas to another server?

I am in the process of getting a new server for Canvas. As I am
waiting, I am doing a lot of testing on how to migrate the data from
the old server to another one, using virtualization.
I was able to dump mysql and copy the public/tmp folders, but my data
does not show up.

Any help or guidance would greatly be appreciated.

John Desha

unread,
Sep 29, 2011, 11:52:08 AM9/29/11
to canvas-l...@googlegroups.com
You will need to copy the config/security.yml file from the old to the new server, and update the config/database.yml file on the new server to make sure it's pointed at your new database.

John Cooper

unread,
Sep 29, 2011, 3:12:06 PM9/29/11
to canvas-l...@googlegroups.com
I completed a production server move recently.

Follow the server install on the new server except for the canvas git
install. Ensure all users are added, including mysql.

Ensure your new server has all the correct levels of ruby, gems etc then
back up /var/rails/canvas, $GEM_HOME and the mysql database for canvas

If you already have /var/rails/canvas, remove or mv the folder before
the restore.

Restore /var/rails/canvas and $GEM_HOME on the new server. Restore the
mysql canvas database. Check /var/rails/config/*.yml files are still
correct for the new server.

Once working you could then do an upgrade, just remember to update the gems

cd /var/rails/canvas
$GEM_HOME/bin/bundle install

to pick up the correct versions for the new Gemfile.

John.

Message has been deleted

John Cooper

unread,
Oct 2, 2011, 8:30:40 AM10/2/11
to canvas-l...@googlegroups.com
On 02/10/11 11:20, pchang wrote:
> Hi John,
>
> Thanks for the information.
> I have successfully done what you have asked and everything seems to
> be up and running. However, as I was testing, I have tried to make an
> Announcement posting, however I get an Unexpected error.
> Do you have any ideas what could be causing this?
>

Sorry, I'm not a RoRs expert but you could first try

cd /var/rails/canvas
$GEM_HOME/bin/bundle install

Just to recheck your gems.

Then if not fixed I'd try performing the actions at

https://github.com/instructure/canvas-lms/wiki/Upgrading

from the "Compiled Assetts" onwards. Remember to prefix with
"RAILS_ENV=production" where applicable :-


$GEM_HOME/bin/bundle exec rake canvas:compile_assets
RAILS_ENV=production $GEM_HOME/bin/bundle exec rake db:migrate
RAILS_ENV=production $GEM_HOME/bin/bundle exec rake db:load_notifications

I would also restart canvas_init just in case

If still the same recheck your install in case you are missing a component.

Finally perhaps do a git update. Remember if your working path is not
the same as the git repository you will have to compare the two
directories and remove anything that is not in the git directory (except
for config and tmp). If they have removed a component and you still have
it in your directory it will error.

John.

chang

unread,
Oct 5, 2011, 5:23:47 AM10/5/11
to Canvas LMS Users
Thanks John.

It's now working. What I forgot to restore was the
canvas_queue_production database.

All is well now.

Thanks for your help.

Cheers,
Peter
Reply all
Reply to author
Forward
0 new messages