Error in checking task in Bash scripts if/else statements task in kodekloud engineer

I have a problem when doing Bash scripts if/else statements task in kodekloud engineer. I do database backup and copy to /opt/db_backups folder and I finished all my task so I click check bottom but my dump file is lost after check and I also fail task.

This is this task, right?

The Nautilus DevOps team is working on to develop a bash script to automate some tasks. As per the requirements shared with the team database related tasks needed to be automated. Below you can find more details about the same:

Write a bash script named /opt/scripts/database.sh on Database Server. The mariadb database server is already installed on this server.

Firstly it would help if you posted the bash script you created for the task

in a code block

so it is legible.

Next, I notice you used cp to copy the backup from Perter’s home directory to /opt/db_backups. That is not what this task expects. The bash script should put the file there.

The reason why it is missing after you end the test - the grader first deletes the file if it is present. Then it will run the script you should have created as /opt/scripts/database.sh and check that the file is recreated. Then it will test the other conditions the question requires.