Created
October 8, 2018 21:11
-
-
Save mani0070/52efbe64cc8c50a3b626408e0d13b45f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$sourceaccountname="https://name.documents.azure.com:443/" | |
$sourceaccountkey="<source account key>" | |
$sourcedatabase="<source database name>" | |
$targetaccountname="https://name.documents.azure.com:443/" | |
$targetaccountkey="<target account name>" | |
$targetdatabase="<target database name>" | |
$collectionstomigrate = @("collection1","collection2","collection3") | |
foreach ($collectionname in $collectionstomigrate) | |
{ | |
Write-Host "Porcessing the collection $($collectionname)" | |
& c:\tools\dt-1.7\dt.exe /s:DocumentDB /s.ConnectionString:"AccountEndpoint=$sourceaccountname;AccountKey=$sourceaccountkey;Database=$sourcedatabase;" /s.Collection:$collectionname /t:DocumentDBBulk /t.ConnectionString:" AccountEndpoint=$targetaccountname;AccountKey=$targetaccountkey;Database=$targetdatabase;" /t.Collection:$collectionname /t.CollectionThroughput:1000 /t.UpdateExisting:true | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment