locked
Copy file between storage accounts RRS feed

  • Question

  • Hello,

    I have two storage accounts with each their own fileshare, one is public with a sastoken and the other is my own storage with a key.

    How to I copy a file from the public fileshare to my own storage?

    Get-AzStorageFileContent -ShareName 'publicshare' -Path 'publicsharefolder\publicfile.txt'  -Destination myownsharexyz -Context xyz


    Wednesday, December 19, 2018 12:26 PM

Answers

  • You should be able to establish two storage contexts - one for the source (via a SAS token) and the other for the destination (via a key).

    At that point, you can simply run Start-AzureStorageBlobCopy

    hth
    Marcin

    • Marked as answer by coffeebakery Thursday, December 20, 2018 12:47 PM
    Wednesday, December 19, 2018 12:45 PM

All replies

  • You should be able to establish two storage contexts - one for the source (via a SAS token) and the other for the destination (via a key).

    At that point, you can simply run Start-AzureStorageBlobCopy

    hth
    Marcin

    • Marked as answer by coffeebakery Thursday, December 20, 2018 12:47 PM
    Wednesday, December 19, 2018 12:45 PM
  • Solved as above. Thanks!
    Thursday, December 20, 2018 12:47 PM