Imagine that you are a lead Linux developer at the top-tech company ABC International Inc. ABC currently suffers from a huge bottleneck: each day, interns must painstakingly access encrypted password files on core servers and back up any files that were updated within the last 24 hours. This process introduces human error, lowers security, and takes an unreasonable amount of work.
As one of ABC Inc.'s most trusted Linux developers, you have been tasked with creating a script called backup.sh which runs every day and automatically backs up any encrypted password files that have been updated in the past 24 hours.
By completing this final project, you will:
Demonstrate your advanced shell scripting skills in a real-world scenario Apply the knowledge you've gained to reviewing and grading technical work submtted by your peers
In this scenario, you are a lead Linux developer at the top-tech company ABC International Inc. As one of ABC Inc.'s most trusted Linux developers, you have been tasked with creating a script called backup.sh which runs every day and automatically backs up any encrypted password files that have been updated in the past 24 hours.
- Save the backup.sh file you're working on and make it executable using:
- Verify the file is executable using the ls command with the -l option using:
- Download the following .zip file with the wget command:
wget https://cf-courses-data.s3.us.cloud-object-storage.appdomain.cloud/IBM-LX0117EN-SkillsNetwork/labs/Final%20Project/important-documents.zip
- Update the file’s last-modified date to now:
- Test your script using the following command:
- Copy the backup.sh script into the /usr/local/bin/ directory and make it excuatable. (Do not use mv.)
- Test the cronjob to see if the backup script is getting triggered by scheduling it for every 1 minute.
- Please note that since the Theia Lab is a virtual environment, we need to explicitly start the cron service using the below command:
- Once the cron service is started, check in the directory /home/project to see if the .tar files are being created.
- If they are, then stop the cron service using the below command, otherwise it will continue to create .tar files every minute:
- Using crontab, schedule your /usr/local/bin/backup.sh script to backup the important-documents folder every 24 hours to the directory /home/project.