Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/wivuu/wivuu.azcosmoscopy
Copy cosmos db databases
https://github.com/wivuu/wivuu.azcosmoscopy
azure cosmosdb tools
Last synced: 1 day ago
JSON representation
Copy cosmos db databases
- Host: GitHub
- URL: https://github.com/wivuu/wivuu.azcosmoscopy
- Owner: wivuu
- License: mit
- Created: 2020-12-02T16:35:53.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2021-07-06T00:18:25.000Z (over 3 years ago)
- Last Synced: 2024-04-28T09:35:42.851Z (9 months ago)
- Topics: azure, cosmosdb, tools
- Language: C#
- Homepage:
- Size: 179 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# AzCosmosCopy
![Nuget](https://github.com/wivuu/Wivuu.AzCosmosCopy/workflows/Nuget/badge.svg)[![wivuu.azcosmoscopy](https://img.shields.io/nuget/v/azcosmoscopy.svg?label=azcosmoscopy)](https://www.nuget.org/packages/AzCosmosCopy/)
Simple CLI application which copies azure cosmos DB database to same or different cosmos account.
![](./sample.png)
## Usage
By default the app will copy up to 10 containers in parallel with 100 documents in parallel per container. These can be tweaked with the `--pc` and `--pd` parameters to match your use-case. For example, if you you have only a few containers with tens of thousands of documents, you may want to increase the number of parallel documents and reduce the number of parallel containers.
**Note** If your destination database account is on free tier (400 RU) the copy may fail if you do not slow down this app by changing the `parallel` arguments, as this application can quickly overwhelm your destination.
Install new
```sh
dotnet tool install -g azcosmoscopy
```Upgrade to latest
```sh
dotnet tool update -g azcosmoscopy
```Command line
```
Options:
-s, --source Source connection string (required)
--sd, --source-database Source database name (required)
-d, --destination Destination connection string
--dd, --destination-database Destination database name
--parallel-containers, --pc Parallel container copies
--parallel-documents, --pd Parallel document copies
-b, --bulk Use bulk executor (serverless not supported)
--dbscale Destination database scale (serverless not supported)
--dcscale Destination container scale (serverless not supported)
--version Show version information
-?, -h, --help Show help and usage information
```## Future
- Switch to Microsoft.Azure.DocumentDB from Microsoft.Azure.Cosmos for non-bulk copy pipeline
- Support passing 'strings' instead of 'objects' to pre-serialize data