• AzCopy: A very useful tool

    Before finishing the chapter on Azure Storage, you need to know about AzCopy. This is a free tool provided by the Azure Storage team to move data around. The core use case is asynchronous server-side copies. When you copy blobs or files from one storage account to another, they are not downloaded from the first storage account to your local machine and then uploaded to the second storage account. The blobs and files are copied directly within Azure.

    Here are some of the things you can do with AzCopy:
     Upload blobs from the local folder on a machine to Azure Blob storage.
     Upload files from the local folder on a machine to Azure File storage.
     Copy blobs from one container to another in the same storage account.
     Copy blobs from one storage account to another, either in the same region or in a different region.
     Copy files from one file share to another in the same storage account.
     Copy files from one storage account to another, either in the same region or in a different region.
     Copy blobs from one storage account to an Azure File share in the same storage account or in a different storage account.
     Copy files from an Azure File share to a blob container in the same storage account or in a different storage account.
     Export a table to an output file in JSON or CSV format. You can export this to blob storage.
     Import the previously exported table data from a JSON file into a new table. (Note: It won’t import from a CSV file.)

    As you can see, there are a lot of possibilities when using AzCopy. It also has a bunch of options. For example, you can tell it to only copy data where the source files are newer than the target files. You can also have it copy data only where the source files are older than the target files. And you can combine these options to ask it to copy only files that don’t exist in the destination at all.

    AzCopy is frequently used to make backups of Azure Blob storage. Maybe you have files in Blob storage that are updated by your customer frequently, and you want a backup in case there’s a problem. You can do something like this:
     Do a full backup on Saturday from the source container to a target container and put the date in the name of the target container.
     For each subsequent day, do an incremental copy—copy only the files that are newer in the source than in the destination.

    If your customer uploads a file by mistake, if they contact you before end of day, you can retrieve the previous version from the backup copy.

    Here are some other use cases:
     You want to move your data from a classic storage account to a Resource Manager storage account. You can do this by using AzCopy, and then you can change your applications to point to the data in the new location.
     You want to move your data from general-purpose storage to cool storage. You would copy your blobs from the general-purpose storage account to the new Blob storage account, then delete the blobs from the original location.

    Source of Information : Microsoft Azure Essentials Fundamentals of Azure Second Edition


0 comments:

Leave a Reply