Automation & Scripting

Fix the Backup Script

250 pts
0 solves
medium hands-on
The backup script at /opt/backup/backup.sh has 3 bugs that prevent it from creating a correct archive of /opt/backup/source/. Bug symptoms: - Files with spaces in their names are skipped or cause errors - Subdirectories are not copied into the staging area - The script continues even when tar fails Fix all 3 bugs so the script produces a valid backup.tar.gz in /opt/backup/output/ containing ALL files (including those in subdirectories and those with spaces in their names). Run the script manually: bash /opt/backup/backup.sh

Ready to solve this?

Create a free account to launch containers, submit answers, and track your progress.