Getting error while performing this task "Day 10: Linux Bash Scripts"

Hi All,

Even though I had completed the task. Im getting the below error. Screen shot below

Im getting the above error for this task “Day 10: Linux Bash Scripts”.

Script used:

#!/bin/bash

Variables

SRC_DIR=“/var/www/html/media”
BACKUP_NAME=“xfusioncorp_media.zip”
LOCAL_BACKUP_DIR=“/backup”
REMOTE_USER=“clint” # Replace with actual backup server username
REMOTE_HOST=“stbkp01” # Replace with backup server hostname
REMOTE_DIR=“/backup”

Step a: Create a zip archive of the source directory

zip -r “${LOCAL_BACKUP_DIR}/${BACKUP_NAME}” “$SRC_DIR”

Step b: Copy archive to Nautilus Backup Server

scp “${LOCAL_BACKUP_DIR}/${BACKUP_NAME}” “${REMOTE_USER}@${REMOTE_HOST}:${REMOTE_DIR}/”

End of script

Pls guide me on the same

Hi @learningmishal

Please refer to the solution here 100-Days-Of-DevOps-KodeKloud-Challenges-Solutions/Day 10: Linux Bash Scripts at main · MelkiMeriem/100-Days-Of-DevOps-KodeKloud-Challenges-Solutions · GitHub

Hi @raymond.baoly,

Thanks for the response but still seeing the same error message even though I had followed the same steps to fix it.
Pls guide/help further if Iam missing anything on this task.

Hi @learningmishal

The KKE task changes the resource names each time you work on it, so please make sure you follow the solution using the correct names.