Rsync in web ssh?

Aleksandar Simovic 51 Reputation points
2022-10-27T07:14:38.427+00:00

Hi all,

I have app service on Azure and when I start ssh, everything is ok, except rsync functiom, I cant use it, and this is the classic error when rsync is not present:

254605-image-2022-10-27-091315304.png

Can someone help me how to solce this? How to enable rsync?

Thanks in advance

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
7,156 questions
0 comments No comments
{count} votes

Accepted answer
  1. VenkateshDodda-MSFT 19,621 Reputation points Microsoft Employee
    2022-10-28T06:50:32.263+00:00

    @Aleksandar Simovic Thank you for reaching out to Microsoft Q&A. Apologize for the inconvenience caused on this.

    Based on the shared information, I have understood that you are trying to run rsync cmdlet in the ssh console to sync the content from your local machine/ between two machines. Since the rysnc is not present you'd received command not found error

    I have tested this in php8.0,php8.1 and php 7.4 webapps as well looks like rsync is not one of the default packages that is available.

    If you want to install rsync and it should be present even after the web app restarts, then you need add the installation cmdlets in startup script of your web apps. Follow the below set of steps to change the custom startup script in php Linux web apps:

    1. Go to the Kudu site for your App (i.e. https://<sitename>.azurewebsites.net) and select SSH from the menu.
    2. Using SSH, go to “/home” directory and create a file called “test.sh” using your favorite editor.
    3. Add the following content.
      254969-image.png
    4. Save the file and pass the path of the file in the StartUp command under configuration tab in the portal.

    You can refer to this documentation for more information on how to install custom start script in PHP web apps.

    Feel free to reach back to me if you have any further questions on this.


0 additional answers

Sort by: Most helpful