Webjob in webapp : azcopy with /S option -> error parameter name is required

laurent-14 146 Reputation points
2021-03-12T10:15:18.41+00:00

Hello,

I made a webjob running on a windows webapp, to run an azcopy command (from blob storage to an other one).

unfortunetly, azcopy V10 seems not installed so I have tried to use the one I found in AzCopy8 folder
Note : there is also a D:/devtools/AzCopy folder but i don't know what version it is (behavior is the same)

My webjob script command :

$SYSTEMDRIVE/devtools/AzCopy8/AzCopy /Source:"..............." /Dest:".................." /SourceKey:..... /DestKey:..... /S

This command works well in the cmd advanced tools of the webapp but failed using webjob :
Error parsing the argument "S:/": parameter name is required.

=> It seems webjob does not support the option without argument (it does the same if I try to add /Y not to get some prompt)

What I have already tried :

  • ................. /S:"" -> same error
  • ................. /S:"*" -> "Error: only True or False are allowed"
  • ................. /S:True or "True" -> "Error parsing the argument "S:True": parameter name is required"
  • ................. /Pattern:"." -> no error but 0 files copied (the same in cmd advanced tools wild card character fails, if i try "*.jpg" -> 0 files too)

would you have an idea ?
laurent

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
6,958 questions
0 comments No comments
{count} votes

Accepted answer
  1. laurent-14 146 Reputation points
    2021-03-15T09:31:24.99+00:00

    For thoses who have same problem, I downloaded the new V10 version to workaround the V8 version problem

    new webjob script :

    cd $HOME/site/deployments/tools
    curl.exe -L -o AzCopy.zip https://aka.ms/downloadazcopy-v10-windows
    unzip -j AzCopy.zip
    azcopy copy "https://........" "https:........." --recursive

    Note : I used tools repository because it is in the path environment variable

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful