1

urgent issue here: we are trying to migrate a meteor.com hosted application to modulus.io

-install app on "new" host. -point new host app to meteor.com mongodb -change CNAME record to new host. -after a couple days, import the data from meteor.com mongodb to new host db, but how? once I update the CNAME record, if there any way to connect to my meteor.com hosted app again?

Cheers!

ChatGPT
  • 5,334
  • 12
  • 50
  • 69

2 Answers2

2

Start up your own mongodb instance at your new host and use mongodb copy command to replicate your entire database from meteor.com hosting.

Of course, you'll need to use meteor mongo --url yoursite.meteor.com to get this and transfer the credentials over to the mongocopy command within 60 seconds, but you'll only need to do this once.

Then, just start up your new server using the new copy of mongo and you should be good to go.

EDIT: you may find these posts helpful for dealing with the gynmastics:

Community
  • 1
  • 1
Andrew Mao
  • 35,740
  • 23
  • 143
  • 224
  • I need the new app to run on the same domain (sub.domain.com) as the meteor.com hosted app. So how to update that CNAME record without 24-48 hours of downtime? I updated my question above to show the problem. – ChatGPT Oct 11 '13 at 16:55
  • That's a different problem altogether and it has to do with DNS hosting, not Meteor programming. You just need to change it and wait, because you don't have control over meteor.com's DNS TTL. – Andrew Mao Oct 11 '13 at 17:26
  • it's meteor/mongo related if there is a way to minimize downtime by pointing one app to the other apps database – ChatGPT Nov 06 '13 at 03:00
  • What are the steps for that? Am i getting that right? 1) meteor mongo --url yoursite.meteor.com url 2) meteor mongo yoursite.com 3) copydb url – Maay Dec 29 '14 at 11:57
  • @Maay yep, although take a look at the extra posts I just linked for some potential help with the details. – Andrew Mao Dec 29 '14 at 20:25
1

Based on your edited requirements, I would:

  1. get your app running on new server with blank mongodb

  2. set up a reverse proxy that forwards both sub. and sub2.domain.com traffic to your app

  3. set up a CNAME that points sub2.domain.com to the new server

  4. copy over the DB data as found in Andrew's answer

  5. update your meteor.com app to just do a temporary redirect (something like window.location="http://sub2.domain.com")

  6. update your sub.domain.com CNAME to point to the new server

This should result in minimal disruption; clients who connect to http://sub.domain.com are auto-redirected to http://sub2.domain.com until the CNAME DNS change propagates. After a few days, the sub2 cname won't be needed anymore and you can remove the sub2 cname and entry from the reverse proxy.

Community
  • 1
  • 1
alanning
  • 5,198
  • 2
  • 34
  • 33