简体   繁体   中英

Cosmos DB data migration

Wanted to implement my own backup mechanism for Cosmos DB. In order to do that wanted just to grab the data every x hours and put it onto some other storage account / different cosmos db instance. Since I can't use Data Factory (not available in my region) is there any other easy way to get data from Cosmos and put it somewhere else? First thing that comes to my mind are just some SQL queries that would go through all collections and copy them. Is there an easier way?

Since you can't use Data Factory (maybe it's most suitable for you), I suggest you using below two solutions:

1. Azure Time Trigger Function .

It supports CORN expression. So ,you could query the data and copy them into the target collection via Cosmos db sdk. However, please note the Azure Function has execution time limitation.

2. Azure Cosmos DB Migration Tool .

You could see the tool could be executed in command-line. So, please package the commands into a bat file. Then use Windows scheduled task to execute the file. Or you could use Azure Web Job to implement the same requirements.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM