You are examining the system log files, backup log files and application log fil
ID: 3890755 • Letter: Y
Question
You are examining the system log files, backup log files and application log files in /var/log and notice that a backup running at 4 AM has only one line of text showing the date and time of the last backup. All previous back up information is missing from this log file. You know that a recent change has been made to the /root/nightly_backup.sh command script. You suspect that something is wrong with the redirection commands in the backup script.
1) What would you look for in the script that indicates redirection
2) What part of the command do you think would account for a single line of text each time the backup ran each night?
3) You notice that the owner of the file is the name of one of your coworkers and they are a senior member of your team. Write a short e-mail discussing the problem with your coworker and how you can work together to fix the problem.
Explanation / Answer
1) checking redirectin symbol > or >>.
if redirection > means each and every time backup script creates a new file to write the content of satndard output .
if redirection > > means each and every time backup script appends satndard output to existing file .
Note : Use >> redirection operator
2) command which used to find the date and time ,i.e) the generated output of the date and time command is redirected to file each time.
Note : Correct the generation of standard output commands as per backup file requirment .
3) Sub: Security Issue on Backup files
Dear sir,
It is informed to you that the file nightly_backup.sh (you are author of fiile ) have code working abnormally .Because the redirection mechanism and the standard output genration for redirection are not as per standard backup file .So,kindly look into this issue.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.