Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

executable file 21 lines (19 sloc) 0.69 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
#!/bin/bash
D=`date | sed "s/ //g"`
HOST1=$1
if [ -z "$HOST1" ]; then
HOST1="127.0.0.1"
fi
HOST2=$2
if [ -z "$HOST2" ]; then
HOST2="127.0.0.1"
fi
mkdir -p /tmp/$D
DBPASS=`./dbPass.sh`
if ( ! mysqldump --all-databases -u eucalyptus --password="$DBPASS" --port=8777 --protocol=TCP --host=$HOST1 --skip-extended-insert --skip-opt --lock-tables=false > /tmp/$D/db.$HOST1 2>/dev/null ); then
rm -f /tmp/$D/db.$HOST1
fi

if ( ! mysqldump --all-databases -u eucalyptus --password="$DBPASS" --port=8777 --protocol=TCP --host=$HOST2 --skip-extended-insert --skip-opt --lock-tables=false > /tmp/$D/db.$HOST2 2>/dev/null ); then
rm -f /tmp/$D/db.$HOST2
fi
echo "/tmp/$D $HOST1 $HOST2"
Something went wrong with that request. Please try again.