Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Omit uploaded files with AzCopy

Tags:

azure

azcopy

I have uploaded with Cloudberry Explorer some files/folders to my Azure container but now I'm gonna change Cloudberry for AzCopy.

What I need is to omit those uploaded files. I don't know if can be done with a AzCopy parameter. the files to be uploaded are stored in a server so doing it manually is impossible due for are thousands of thousands of files/folders.

thanks in advance

like image 358
Néstor Avatar asked Nov 27 '14 15:11

Néstor


2 Answers

As it is documented in azcopy reference

--overwrite string Overwrite the conflicting files and blobs at the destination if this flag is set to true. Possible values include 'true', 'false', 'ifSourceNewer', and 'prompt'. (default "true")

So something like this should work:

azcopy.exe copy "source location" "destination location" --overwrite=false
like image 51
EthanX Avatar answered Sep 28 '22 04:09

EthanX


Use /XO flag in the command. It will not copy/replace old files. Sample command,

AzCopy /Source:C:\myfolder /Dest:https://myaccount.blob.core.windows.net/mycontainer /DestKey:key /XO

like image 27
Abhishek Avatar answered Sep 28 '22 02:09

Abhishek