#!/bin/sh

PGHOME=/home/snaga/pgsql746

export PATH=$PGHOME/bin:$PATH

psql -f ${PGHOME}/share/contrib/forest_recovery.sql -p 9998 testdb
psql -f ${PGHOME}/share/contrib/forest_recovery.sql -p 9999 testdb

. ./ForestRecovery.sh \
	-phase1 \
        -user snaga \
        -pass snaga \
        -gsc_url jdbc:postgresql://localhost:9998/gsc \
        jdbc:postgresql://localhost:9998/testdb \
        jdbc:postgresql://localhost:9999/testdb

. ./ForestRecovery.sh \
	-stop_vm \
        -user snaga \
        -pass snaga \
        -gsc_url jdbc:postgresql://localhost:9998/gsc \
        jdbc:postgresql://localhost:9998/testdb \
        jdbc:postgresql://localhost:9999/testdb

. ./ForestRecovery.sh \
	-phase2 \
        -user snaga \
        -pass snaga \
        -gsc_url jdbc:postgresql://localhost:9998/gsc \
        jdbc:postgresql://localhost:9998/testdb \
        jdbc:postgresql://localhost:9999/testdb

. ./ForestRecovery.sh \
	-cleanup \
        -user snaga \
        -pass snaga \
        -gsc_url jdbc:postgresql://localhost:9998/gsc \
        jdbc:postgresql://localhost:9998/testdb \
        jdbc:postgresql://localhost:9999/testdb

