From c61bedbcf6638848bb7dec5cab8f2fd6a2dcc47c Mon Sep 17 00:00:00 2001 From: j38560 Date: Tue, 20 Dec 2016 08:50:02 +0000 Subject: [PATCH] Run compare on remote host. --- bin/diff.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/bin/diff.sh b/bin/diff.sh index ef0543c..dd87906 100644 --- a/bin/diff.sh +++ b/bin/diff.sh @@ -4,8 +4,11 @@ ROOT="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" source $ROOT/set_env.sh source $ROOT/functions.sh -mysqldbcompare --skip-data-check --server1=deployment@$SOURCE_IP --server2=deployment@$TARGET_IP performance:performance --changes-for=server2 -a --difftype=sql > $ROOT/../changes.sql +runRemoteSSH "$ROOT/../keys/deploykey.private" 'mysqldbcompare --skip-data-check --server1=deployment@$SOURCE_IP --server2=deployment@$TARGET_IP performance:performance --changes-for=server2 -a --difftype=sql > $ROOT/../changes.sql' echo "Differences: echo "##########################" -echo `cat $ROOT/../changes.sql` \ No newline at end of file +runRemoteSSH "$ROOT/../keys/deploykey.private" "cat $ROOT/../changes.sql" +echo "##########################" + +scp -o StrictHostKeyChecking=no -i $ROOT/../keys/deploykey.private root@$TARGET_IP:/tmp/changes.sql . \ No newline at end of file -- GitLab