Default MongoDB Database NAme

Hi Team

I have my application on Moralis 1.0
There is MongoDB instance created for same in Moralis
While self-hosting, i need to migrate my database to our hosted database server
I am using mongo-tools for the same
mongodump command requires DB name
I can only see collection and i need database name for that.
What would that be?

image

Hi,
you can create a database name in mongo bd using the Create Database option.

Once created you can use it for migrating.

I am asking from Moralis side

It is for the data that we have stored in Moralis MongoDB.
I am dumping that in Mongo collections using

udo mongodump --host=4.1.2.3 --port=56728 --db=marketplace --collection=EthTransactions --out=/Downloads/out.json

Now I need my Moralis Data migration to Mongo.
but Moralis Data collection dont have a database name attached

You will find it in documentation, the database that you have to dump is named parse

1 Like

I could not find it from documentation exactly.
I can only see Parse mentioned for database (at few reads) and if i access database from Moralis, I see collections only.

Command for your reference

sudo mongodump --host=4.1.2.3 --port=56728 --db=parse --collection=EthTransactions --out=/Downloads/out.json
2022-12-19T13:01:13.437+0530 Failed: error connecting to db server: no reachable servers

I am not familiar with this error. Can you confirm if you have the latest mongo cli tool installed? and if you have whitelisted your local IP in the moralis admin page?

yes, I installed latest mongo-cli
Yes, Whitelisted my Local IP from Moralis ADMIN Page

Can I get connection string for Moralis attached MongoDB?
That can help me get the dump from Moralis attached MongoDB.

You have to use the server IP and port, to whitelist your public ip (the one that you could find with a google search)

Where do i need to whitelist my IP?

in admin interface, in a tab specific to databases, same page where you can see the mongo db IP

I whitelisted my IP address in Moralis Server.
I have deployed parse-server repo in AWS EBS
I made changes to my BE/FE with URL I received from parse-server-migration deployment.
But

curl --location --request POST ‘http://dao.us-south-2.elasticbeanstalk.com/server/users’ \

–header ‘Accept: /’ \

–header ‘Accept-Language: en-GB,en-US;q=0.9,en;q=0.8’ \

–header ‘Connection: keep-alive’ \

–header ‘Content-Type: text/plain’ \

–header ‘Origin: http://localhost:5000’ \

–header ‘Referer: http://localhost:5000/’ \

–header ‘User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36’ \

–data-raw ‘{“authData”:{“moralisEth”:{“id”:“0xea76adbgtchryti852130843082f924eefcb30790f03”,“signature”:“0xb37b09abvdjutopppws10b8283744f7b4f386b72a58ce8a232bbac4068c4af650f727073aaf1cfbc73dbf1329d1eacd435c3403640f92e21abcb5647c7a8bcc9cdea1c”,“data”:“Signing in to DAO”}},"_ApplicationId":“3”,"_ClientVersion":“js0.0.118”,"_InstallationId":“3davrb78-1584-4f62-93dd-baff5cc0e862”}’

is throwing 404
which looks like an API from Moralis

Am i missing something?

Should I try deploying my code repository on EBS?

it looks like it is using an old version of Moralis SDK v1, (0.0.118) and it also looks like it it not using the new way of authentication with a request message call to a cloud function in order to get the message to sign

you can find examples here of how the authentication should be implemented with a self hosted server:

Is there any video reference?
Also, My understanding so far is our application was getting authentication from Moralis Web3 API Keys
How Would this new Front End be made to our application?
Also, would the applicationId be the one from moralis or the one we created while parse-server deployment?

try to understand the code from that link that I pasted above, it is a small change to current authentication, it signs a different message