[MUSIC]
>> How do I migrate
my Mongo database into Cosmos DB?
MongoDB is a very popular database
and it is a document-based database.
It is very popular these days.
But, if you want to
run that on Azure,
we have the possibility to
create a Cosmos DB account,
and then to put this data
into Cosmos DB.
Now, Cosmos DB offers
large number of APIs and one
of those APIs is Mongo API.
What it means is that even though
the storage is in Cosmos DB,
you can use the MongoDB
APIs to access your data.
Basically, you don't need to change
your application which
is super convenient.
Now, for the migration itself,
we have two ways to do that.
One way is simply to
use a Mongo tool.
So, we have mongodump, mongorestore,
and so what you would
do is just login to
your virtual machine hosting
the MongoDB using SSH for example,
and then you can do
the migration using mongodump,
and then later you do
a mongorestore into Cosmos DB.
That works great. But,
we have another solution
which is even more
flexible, I would say.
This is a database migration service.
This is something that
you create on Azure,
it's an Azure resource and then
you select as the source your
MongoDB virtual machine
or your MongoDB database,
the target would be the Cosmos DB.
The nice thing with the DMS,
with the Database Migration Service
is that we also perform
the migration online
so you don't have
to switch your web application,
or your website off during
the migration time,
the migration is performed.
The migration service keeps
everything synchronized,
and then when you are done and ready,
you can basically connect
to your new data,
make sure that everything's fine,
switch the connection string
into your application,
and then you're good to go.
So basically, two ways to do that;
easily using the native Mongo tools
which are totally supported,
or you can use the Azure
Database Migration Service.
[MUSIC]
