Solved

Automatic backup script & disk space Checking Script

Posted on 2003-11-17
6
625 Views
Last Modified: 2011-10-03
Hi,
i am a new user to linux......

i want to implement the following two actions in my server.

1)execute one script which will take backup of "/home/abc" to "/dev/fd0" automatically at a perticular time .

2)execute one script which will keep on monitoring the disk space used in /home partition and if the disk space used reaches 90% it should send a message to webmaster@abc.com regarding this.

if anybody has the above scripts available plz provide me.....

my mail id : deepak@indiadomain.com

Thanks/Regards
Deepak Jena
0
Comment
Question by:deepakjena_2003
  • 3
  • 3
6 Comments
 
LVL 18

Accepted Solution

by:
liddler earned 50 total points
Comment Utility
Deepak Jena,
Use cron to schedule your tasks, to edit your crontab, type:
crontab -e
to make a copy of the files in /home/abc to /dev/fd0, the command is
cp -r /home/abc /dev/fd0
so to run it each day at 9:00am
your  crontab entry should be:
0 9 * * *  /bin/cp -r /home/abc /dev/fd0

disksize command
 if [[ `df -k /var| grep var |awk '{print $5}' |cut -d% -f1` -gt "90" ]];then /usr/bin/mailx -s Diskfull  webmaster@abc.com ;fi

you can run this from cron as above (say evey 15 minutes)
0,15,30,45 * * * * if [[ `df -k /var| grep var |awk '{print $5}' |cut -d% -f1` -gt "90" ]];then /usr/bin/mailx -s Diskfull  webmaster@abc.com ;fi

PS Please do not put your email address in Questions



0
 

Author Comment

by:deepakjena_2003
Comment Utility
Thanks a lot...

0
 

Author Comment

by:deepakjena_2003
Comment Utility
please delete this question...

Thanks/Regards
Deepak Jena
0
Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

 
LVL 18

Expert Comment

by:liddler
Comment Utility
Deepak Jena,
The question doesn't get delete, it is stored in a database of Previously Asked Questions (PAQs) that other people can search.
0
 

Author Comment

by:deepakjena_2003
Comment Utility
Hi,

can i use the above points..

bcz i have only 30 points available (50 for this question and 50 for another which is still open)

Thanks/Regards
Deepak
0
 
LVL 18

Expert Comment

by:liddler
Comment Utility
No,
As the qustion has been answered your points have gone.
Have you done the new member survey (http://www.experts-exchange.com/survey.jsp?sid=2), for 200 extra points?
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

The purpose of this article is to fix the unknown display problem in Linux Mint operating system. After installing the OS if you see Display monitor is not recognized then we can install "MESA" utilities to fix this problem or we can install additio…
The purpose of this article is to demonstrate how we can upgrade Python from version 2.7.6 to Python 2.7.10 on the Linux Mint operating system. I am using an Oracle Virtual Box where I have installed Linux Mint operating system version 17.2. Once yo…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now