mongodb replica set
vinibgoulart
PROOP

2 months ago

How can I configure my mongodb for use replica set with attached volume in the service?

image.png

image.png

3 Replies

vinibgoulart
PROOP

2 months ago

What is the steps to migrate this?


2 months ago

You'll need to follow these steps:

  1. Deploy a Replica Set, you can do this manually or use a template (like ) [note: i havent tested or proofed this template, this is just an example]
  2. mongodump your existing mongodb database data somewhere
  3. mongorestore your mongodump data to the primary node of the replica set

Notes:

  • Make sure you trust the replica-set template you're using
  • I'd recommend not deleting your existing service or making changes to it until after you've confirmed the replica-set migration worked. If something goes wrong you'll want something to fallback to
  • I'd recommend keeping the mongodump data on your PC for a while, just to be safe - if something goes wrong you'll still have your data
  • You can get mongodump and mongorestore from MongoDB CLI DB Tools

2 months ago

I'm going to bed now but I'll check back here when I wake up


Welcome!

Sign in to your Railway account to join the conversation.

Loading...