LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Blogs > path_finder
User Name
Password

Notices

Rate this Entry

Shell with many functions

Posted 04-14-2010 at 02:35 PM by path_finder

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 root@localhost at the end of each execution containing date, total time of execution, encountered problems.
Posted in Uncategorized
Views 3337 Comments 0
« Prev     Main     Next »
Total Comments 0

Comments

 

  



All times are GMT -5. The time now is 03:15 PM.

Main Menu
Advertisement

My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration