Code

pgtest.sh: Added dump/restore commands.
authorSebastian Harl <sh@tokkee.org>
Mon, 12 Nov 2012 10:38:43 +0000 (11:38 +0100)
committerSebastian Harl <sh@tokkee.org>
Mon, 12 Nov 2012 10:38:43 +0000 (11:38 +0100)
pgtest.sh

index 8cbb27cacddcca65b173a74ea5d5adbc272442b3..d911b5c9dbd47fb3f4e6a8e8966d63dab08697ba 100755 (executable)
--- a/pgtest.sh
+++ b/pgtest.sh
@@ -96,6 +96,14 @@ case "$1" in
        restart)
                $0 stop && $0 start -B
                ;;
+       dump)
+               shift
+               $BIN_DIR/pg_dump -h $TARGET/var/run/postgresql/ -p 2345 "$@"
+               ;;
+       restore)
+               shift
+               $BIN_DIR/pg_restore -h $TARGET/var/run/postgresql/ -p 2345 "$@"
+               ;;
        *)
                echo "Usage: $0 setup|client|stop|start" >&2
                echo ""