Knowledge Base
MilesWeb / How-Tos

Setting email alert when backup limit exceeds

Approx. read time : 2 min

If you have hosted your website on a VPS or a dedicated server, you might like to get an update if the current backup disk-space limit exceeds.

Email alert script

So here is a step by step process to create a disk-space monitoring script that can send you an email if the backup limit exceeds.

You must be already having root access to your server.

Step: 1. Login to your server with SSH

Step: 2. Run the following commands to create a script:

Step: 3. Now by using a text editor like nano create the following script:

Change the user@example.com address and the 10 threshold below:

Step: 4. If you were following along and using nano to edit this file, you can now press Ctrl-O to bring up the write file dialog, and then press Enter to save the changes.

Now once a day your server will check to see if the disk-space usage is over the current level of automatic backups or not.

If the limit exceeds, you will receive an email at the email address you entered in the script.

Avatar
Pravin is Journalist Specializing in Blogging, Social Networking and Community Management. As a constant learner, he is always aiming towards new ideas and greater knowledge. When he is not doing research, reading, or writing for blogs, you can find him hanging around social media sites.