项目作者: wivuu

项目描述 :
Copy cosmos db databases
高级语言: C#
项目地址: git://github.com/wivuu/Wivuu.AzCosmosCopy.git
创建时间: 2020-12-02T16:35:53Z
项目社区:https://github.com/wivuu/Wivuu.AzCosmosCopy

开源协议:MIT License

下载


AzCosmosCopy

Nuget

wivuu.azcosmoscopy

Simple CLI application which copies azure cosmos DB database to same or different cosmos account.

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

  1. dotnet tool install -g azcosmoscopy

Upgrade to latest

  1. dotnet tool update -g azcosmoscopy

Command line

  1. Options:
  2. -s, --source <source> Source connection string (required)
  3. --sd, --source-database <source-database> Source database name (required)
  4. -d, --destination <destination> Destination connection string
  5. --dd, --destination-database <destination-database> Destination database name
  6. --parallel-containers, --pc <parallel-containers> Parallel container copies
  7. --parallel-documents, --pd <parallel-documents> Parallel document copies
  8. -b, --bulk Use bulk executor (serverless not supported)
  9. --dbscale <dbscale> Destination database scale (serverless not supported)
  10. --dcscale <dcscale> Destination container scale (serverless not supported)
  11. --version Show version information
  12. -?, -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