View the step-by-step solution to:

Write a shell script named daily-backup.sh that does the following: -Discovers all users defined on the system excluding system and services users.

Write a shell script named daily-backup.sh that does the following:
-Discovers all users defined on the system excluding system and services users.


-For each of these users, locates the home directory and create an compressed archive for this directory (.tar.gz).


-Creates a global archive that contains all archived users home directories and save it in /var/backup.
-The script should be daily run at 1AM and for each execution, the global archive name should reflect the date of the archive creation.
- The shell script should produce a log file under /var/log/daily-backup.log to which will be added each day the following information: date of script execution, result of each user home directory archiving (archive name, size, and archive process result code) and same information about the global archive file.

-The script should send a summary report in email to [email protected] at the end of each execution containing date, total time of execution, encountered problems.

Recently Asked Questions

Why Join Course Hero?

Course Hero has all the homework and study help you need to succeed! We’ve got course-specific notes, study guides, and practice tests along with expert tutors.

-

Educational Resources
  • -

    Study Documents

    Find the best study resources around, tagged to your specific courses. Share your own to gain free Course Hero access.

    Browse Documents
  • -

    Question & Answers

    Get one-on-one homework help from our expert tutors—available online 24/7. Ask your own questions or browse existing Q&A threads. Satisfaction guaranteed!

    Ask a Question