Nov 27
We need to migrate the data from a server to a new server often and it can be because of several factors like
- Old server is having hardware issues and need to be replaced completely
- Server is being upgraded and full data needs to be transferred
- The servers are being transferred from one data center to another
and many more. This script can be used to migrate all user data and the cPanel config files from Old server to new Server. Continue reading »
Nov 27
Backup option is available in both cPanel and WHM. Backup option in cPanel can not be set to automatic backups and the user has to login and manually generate the backup. Backup feature in WHM allows scheduled backups but Resellers are not provided with that option. As backup is a must thing so I wrote a small bash script that will backup the databases and the accounts data for all the accounts under the mentioned reseller and transfer the backup to a backup server. This script requires that the backup server should allow scp or rsync and supports SSH Authentication Keys.This script doesn’t need any update if the reseller adds new accounts or any user creates new databases. Continue reading »
Feb 14
I wrote this bash script to control DDOS attack. It doesn’t block the Ips automatically but will show you a list of Ips that have more connections than defined in Max variable. It will display a menu and its easy to use. The script will also log the activities in a log file so you can latter check that which Ips were blocked by it. Continue reading »
Feb 14
Here is a simple bash script that I wrote to get a notification email whenever any of the server partition grows over the defined size. The size can be defined for MAXSIZE variable. You can then setup a cron to run this script after every few hours. You will not be bombarded with the notification emails as this script will send the notification email only when a partition is over the MAXSIZE. Continue reading »