Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@pmatthews05
Created April 8, 2021 15:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pmatthews05/db9ecb5c4ad90f32270495758d8e57a1 to your computer and use it in GitHub Desktop.
Save pmatthews05/db9ecb5c4ad90f32270495758d8e57a1 to your computer and use it in GitHub Desktop.
AzCopy Migration
$SourceAccountName = "[SOURCEACCOUNTNAME]"
$SourceContainerName = "[SOURCECONTAINERNAME]"
$SourceBlobSAS = "[SOURCESAS]"
$DestinationAccountName = "[DESTINATIONACCOUNTNAME]"
$DestinationContainerName = "[DESTINATIONCONTAINERNAME]"
$DestinationBlobSAS = "[DESTINATIONSAS]"
$SourceContainerURL = "https://$SourceAccountName.blob.core.windows.net/$SourceContainerName"
$DestinationContainerURL = "https://$DestinationAccountName.blob.core.windows.net/$DestinationContainerName"
Write-Host "Sync from Source $SourceContainerURL to Destination $DestinationContainerURL..."
.\azcopy.exe sync "$($SourceContainerURL)?$($SourceBlobSAS)" "$($DestinationContainerURL)?$($DestinationBlobSAS)"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment