Consider scenario on large production system, when a new table is created or an alter table is triggered then we may need to notify few users. We came across a same scenario when the table schema or new table created, we need to notify few users. Assumption: Mysql general query… Continue Reading Send notification when alter, create table event occurs on mysql

Assumption: We have access key and secret key which has a privilege to create snapshot, delete snapshot, list volumes,etc., The script will keep 4 days retention and delete the old backups.   #!/usr/bin/python #Author:Dhanasekaran N #Email:dhanasekaran.n16@gmail.com,support@pheonixsolutions.com #Usage:python create_aws_snapshot.py AWS_TAG_NAME #Version:1.0 #Here come I……. from datetime import datetime, timedelta import datetime… Continue Reading Python Script to take backup of Ec2 Volume with days retention

This post may be useful if we want to keep track what your users are executing on the server. You can write some custom scripts incase of any abnormal activity being done by the user. Add the following line in /etc/bashrc export PROMPT_COMMAND=’RETRN_VAL=$?;logger -p local6.debug “$(whoami) [$$]: $(history 1 | sed… Continue Reading Enable command logging on Linux hosts

Scenario/Use case: Consider, we have a jumpbox which has access to all the production machine and we don’t want to expose SSH access to public. In such scenario, we can allow only jumpbox to public access and through jumpbox, we can access remaining machines. But, its a pain to login… Continue Reading Use jumpbox to ssh to servers

FUSE-based file system backed by Amazon S3. Mount a s3 bucket as a local file system to read/write. Since the bucket is mounted as a local file system, the  write/read operation is faster than when we read the file from s3 bucket directly. Install Dependencies: yum install gcc libstdc++-devel gcc-c++… Continue Reading S3Fs installation

Most of the renowned ESPs such as gmail or hotmail or yahoo do not like to mailed to from the same address multiple times in a short span. If they detect (and they will) that a server’s IP is sending out bursts of emails in short span of time or… Continue Reading Postfix : Rate limit based on recipients throttling