This file contains 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 | |
# Name: MySQL_REBUILD_LIVE_SLAVE_from_MASTER | |
# Purpose: Rebuilds live all Databases of a replication SLAVE based on a good running MASTER | |
# This rebuilt action is done without stopping the MASTER MySQL server or even locking the tables | |
# or the destination server (SLAVE) | |
# Syntax: MySQL_REBUILD_LIVE_SLAVE_from_MASTER Master:Port Slave:Port {F|P} | |
# eg. MySQL_REBUILD_LIVE_SLAVE_from_MASTER db1:3306 www1:3306 P | |
# {F|P} - Dump method F) Uses a full temporary dump file method P) Uses the pipe method | |
# Note: In some situation where the databases are very big (GB) the Pipe (P) method might not work well | |
# In these case it is recommended to use the File(F) method |