How do I avoid the prompts while using azcopy on Linux in a script?

家住魔仙堡 提交于 2019-11-30 16:59:02

问题


I've got a Python script that runs the AzCopy command to backup my storage accounts. However, it keeps throwing a prompt with the following message.

Incomplete operation with different command line detected at the journal directory "/home/azureuser/Microsoft/Azure/AzCopy". Do you want to overwrite the journal to start a new operation? Choose Yes to overwrite, choose No to cancel current operation. (Yes/No) y

On the Windows version of AzCopy I could add the /Y parameter. But I'm on a Linux machine.

Is there an equivalent parameter for Linux?


回答1:


Please try azcopy with the --quiet option.

If you type azcopy --help, you will see this option with the following description:

--quiet              Suppresses all AzCopy confirmation prompts.



回答2:


If using azcopy sync, you have to be crafty:

echo N | azcopy sync ... --force=false


来源:https://stackoverflow.com/questions/49849548/how-do-i-avoid-the-prompts-while-using-azcopy-on-linux-in-a-script

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!