I have complete the linux bash script task correctly if i run the script i am able to get the zip

HI Team,

After running i am able to the get the zip in backup server but i was failed sayinh "- ‘xfusioncorp_media.zip’ is not found under ‘/backup’ on Backup Server
", i have removed the scipt after getting because there is no line called run the script, i thought you people will run manually and check for the zip. Please look at this issue and resolve my issue.

@vishnu123sai

Hi Vishnu! In the task didn’t they ask to create a bash script? As you removed the zip file, it’s showing file is not found.

1 Like

Hi Lakshmi, here. What ever screenshot provided is after running the script i am able to get the zip in backup server. In the question they didnt mention that we need to run the script thats why i have checked whether the file is copying or not by running the script, yes its copying so i was deleted the file. please read the error in first comment in quote issue is only there is no zip file i am able to run the script and i received the file.

I think you got it now

Hi @Lakshmi , I also got the same reason for task failed, not able to figure it out why .
I had the following contents in my script:

#!/bin/bash
zip -r /backup/ file-name.zip /var/www/html/official
scp /backup/ file-name.zip [email protected]:/backup/

I did install zip unzip package and ssh-keygen , ssh-copy-id stuff outside the script as it wasn’t required inside the script.

1 Like