DISCLAIMER : Please note that blog owner takes no responsibility of any kind for any type of data loss or damage by trying any of the command/method mentioned in this blog. You may use the commands/method/scripts on your own responsibility.If you find something useful, a comment would be appreciated to let other viewers also know that the solution/method work(ed) for you.


Install AzCopy on Linux - Fastest way to copy in Azure

AzCopy is a command-line utility designed for copying data to/from Microsoft Azure Blob, File, and Table storage, using simple commands designed for optimal performance. You can copy data between a file system and a storage account, or between storage accounts.

There are two versions of AzCopy that you can download. AzCopy on Linux is built with .NET Core Framework, which targets Linux platforms offering POSIX style command-line options. AzCopy on Windows is built with .NET Framework, and offers Windows style command-line options.

This article covers AzCopy on Linux.

Installation on Linux


AzCopy on Linux requires .NET Core framework (version 2.0) on the platform. See the installation instructions below 

Install and enable the .NET SDK


After registering with the Subscription Manager and enabling the .NET Core channel, you are ready to install and enable the .NET SDK.

In your command prompt, run the following commands: 

yum install rh-dotnet20 -y scl enable rh-dotnet20 bash

Once you have installed .NET Core, download and install AzCopy.

wget -O azcopy.tar.gz https://aka.ms/downloadazcopyprlinux tar -xf azcopy.tar.gz sudo ./install.sh

You can remove the extracted files once AzCopy on Linux is installed. Alternatively if you do not have superuser privileges, you can also run AzCopy using the shell script 'azcopy' in the extracted folder.

The basic syntax for AzCopy commands is: 

azcopy --source <source> --destination <destination> [Options]

The following examples demonstrate various scenarios for copying data to and from Microsoft Azure Blobs and Files. Refer to the azcopy --help menu for a detailed explanation of the parameters used in each sample.

If any user face issue while running azcopy command which asks for dotnet files, enter the below line in the users .bashrc file.

source scl_source enable rh-dotnet20

If  a user oracle needs to run this command, then add the below line to the oracle .bash_profile under PATH section

/opt/rh/rh-dotnet20/root/usr/bin/

Add the below line in the script if you would use azcopy in a shell script.

source scl_source enable rh-dotnet20

Now type azcopy in the server and it shows the available options to use, you can explore the options and use this command as required.

Do you like this story?

No comments:

Post a Comment