This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# mysqlbackup | |
# Developed In: bash — Contributed by: Partha Dutta | |
# http://forge.mysql.com/tools/tool.php?id=14 | |
# mysqlbackup - Perform mysql backup | |
slave_backup=0 | |
backup_host=localhost |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Check Replication Slave Status | |
# http://forge.mysql.com/tools/tool.php?id=6 | |
## Matthew Montgomery ## | |
## [email protected] ## | |
repeat_alert_interval=15 # minutes | |
lock_file=/tmp/slave_alert.lck |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# http://ec2dream.blogspot.com/2009/03/networking-in-ec2.html | |
#Setup a cron job to update /etc/hosts as often as you like. I do it once per hour on #all my machines | |
# | |
#0 * * * * /usr/local/sbin/hosts -a myaccess -s mysecret >/etc/hosts | |
# | |
#All my machines have this ec2 security key + script + cron approach. I do not have to #run dyndns or any private dns servers to keep track of all my internal server ip #addresses. My /etc/hosts looks like the following on the three machines in the test #cluster: | |
#127.0.0.1 localhost | |
#10.252.202.221 oahu.ec2 oahu | |
#10.253.115.175 maui.ec2 maui | |
#10.253.114.190 hawaii.ec2 hawaii |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Striping across EBS volumes | |
http://developer.amazonwebservices.com/connect/thread.jspa?threadID=30122&tstart=0 | |
Create the new EBS volumes | |
Attach them to your instance | |
Use mdadm to create an md0 device in RAID 0 striped mode using the new EBS volumes | |
Stop MySQL | |
Format/mount md0 and copy all your data from the original EBS's mount point to the md0 device's mount point | |
Make any required changes to MySQL so it knows where to find the databases at the new mount point (or unmount the old EBS and remount md0 to the original mount point) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Courtesy | |
# http://ec2dream.blogspot.com/search/label/EBS | |
#!/usr/bin/ruby | |
require 'rubygems' | |
require 'right_aws' | |
require 'net/http' | |
url = 'http://169.254.169.254/2008-02-01/meta-data/instance-id' | |
instance_id = Net::HTTP.get_response(URI.parse(url)).body |
NewerOlder