Linux Bash Scripts-vinod

Hi Team,

regarding the below task it was working as expected and I can even see the zip file got created using the script, But when I finished the task it is saying its not got created. Even i have done the passwordless authentication too.

please find the script below

#!/bin/bash

My first script

cd /var/www/html/ecommerce
zip -r xfusioncorp_ecommerce.zip /var/www/html/ecommerce
cp /var/www/html/ecommerce/xfusioncorp_ecommerce.zip /backup/
scp -r /backup/xfusioncorp_ecommerce.zip [email protected]:/backup

Can you please explain the reason regarding this???

hello @vinodkumar4b9,

seems you are on wrong server, task is to create on the backup server(stabkp01)
please check the inventory once.

Thanks
Rahul

Given ip is correct for backup server but seems like you haven’t used that server sudoers user. Instead of using tony, you have to use clint. May be that’s the reason of failed task.