Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to compress/zip files in Microsoft Azure App Service console?

enter image description here

I know about the KUDU service in Microsoft Azure and it works great. However I have got very large data, which is greater than 3GB and it takes very long time to download and then upload to my new server. Is there a way to zip the data on Azure through command line and then do wget to download this data on new server. I have been doing this manually till now but it is taking it forever to download it to my PC first and then uploading to the server through FTP.

I am logged into Microsoft Azure App Service Console. I have tried compress, Compress-Archive and even zip command but nothing works. It says that famous internal and external command not found message.

'compress' is not recognized as an internal or external command, operable program or batch file.

How could I compress these file on Azure console? Earliest help would be appreciated.

Or is there a way to install some compression tool on this server through command line?

like image 583
Arvind K. Avatar asked Feb 27 '19 12:02

Arvind K.


People also ask

How do I zip a file from console?

The easiest way to zip a folder on Linux is to use the “zip” command with the “-r” option and specify the file of your archive as well as the folders to be added to your zip file. You can also specify multiple folders if you want to have multiple directories compressed in your zip file.

What is zip deploy in Azure?

zip (compressed) file. You learn how to do a push deployment, both by using Azure CLI and by using the REST APIs. Azure Functions Core Tools also uses these deployment APIs when publishing a local project to Azure. Zip deployment is also an easy way to run your functions from the deployment package.


2 Answers

While the unzip utility is available, there's no zip tool. One way around that is to upload the command line version of 7-Zip, it's a standalone .EXE file.

like image 160
CSharpRocks Avatar answered Sep 25 '22 03:09

CSharpRocks


Now Windows and Kudu both support a native tar command, why not use that.

tar -cvzf my_archive.tar.gz input_dir
tar -xf my_archive.tar.gz
like image 32
PeteN Avatar answered Sep 25 '22 03:09

PeteN