?
Solved

Automatic backup script & disk space Checking Script

Posted on 2003-11-17
6
Medium Priority
?
631 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
6 Comments
 
LVL 18

Accepted Solution

by:
liddler earned 200 total points
ID: 9763333
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
ID: 9763477
Thanks a lot...

0
 

Author Comment

by:deepakjena_2003
ID: 9769881
please delete this question...

Thanks/Regards
Deepak Jena
0
Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

 
LVL 18

Expert Comment

by:liddler
ID: 9769944
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
ID: 9769962
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
ID: 9769986
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

Automating Terraform w Jenkins & AWS CodeCommit

How to configure Jenkins and CodeCommit to allow users to easily create and destroy infrastructure using Terraform code.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Suggested Courses

762 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