Solved

Automatic backup script & disk space Checking Script

Posted on 2003-11-17
6
628 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 50 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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

[Webinar] Code, Load, and Grow

Managing multiple websites, servers, applications, and security on a daily basis? Join us for a webinar on May 25th to learn how to simplify administration and management of virtual hosts for IT admins, create a secure environment, and deploy code more effectively and frequently.

Question has a verified solution.

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

Have you ever been frustrated by having to click seven times in order to retrieve a small bit of information from the web, always the same seven clicks, scrolling down and down until you reach your target? When you know the benefits of the command l…
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…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

734 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