User Tools

Site Tools


furnished_bckup_mysql

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
furnished_bckup_mysql [2009/05/02 07:13] – created k2patelfurnished_bckup_mysql [2020/08/10 02:35] (current) – external edit 127.0.0.1
Line 39: Line 39:
  
 DB_USR="" DB_USR=""
 +
 +# Specify your DB Host
 +
 +DB_HOST=""
    
 # Ignore following databse from backup # Ignore following databse from backup
Line 45: Line 49:
    
 # Get list of all databases # Get list of all databases
-DB_LIST=`$mysql -Bse -u $DB_USR -p$DB_PASS 'show databases'`+DB_LIST=`$mysql -h $DB_HOST -Bse -u $DB_USR -p$DB_PASS 'show databases'`
    
 for db in $DB_LIST; do for db in $DB_LIST; do
Line 59: Line 63:
    
         if [ "$skip" == "0" ]; then         if [ "$skip" == "0" ]; then
-                $mysqldump $db | gzip -9 > $BACKUP_DIR/$db.$DATE.sql.gz+                $mysqldump -R -h $DB_HOST -u $DB_USR -p$DB_PASS $db | $gzip -9 > $BACKUP_DIR/$db.$DATE.sql.gz
  if [ "$OWN_FILE" != ""]; then   if [ "$OWN_FILE" != ""]; then 
  $chown $OWN_FILE $BACKUP_DIR/$db.$DATE.sql.gz  $chown $OWN_FILE $BACKUP_DIR/$db.$DATE.sql.gz
furnished_bckup_mysql.1241248403.txt.gz · Last modified: 2020/08/10 02:30 (external edit)