6
6
# and "pg_group" tables, which belong to the whole installation rather
7
7
# than any one individual database.
8
8
#
9
- # $Header: /cvsroot/pgsql/src/bin/pg_dump/Attic/pg_dumpall.sh,v 1.5 2000/10/25 10: 21:38 pjw Exp $
9
+ # $Header: /cvsroot/pgsql/src/bin/pg_dump/Attic/pg_dumpall.sh,v 1.6 2000/11/02 21:13:32 petere Exp $
10
10
11
11
CMDNAME=` basename $0 `
12
12
72
72
73
73
usage=
74
74
cleanschema=
75
+ accounts_only=
75
76
76
77
#
77
78
# Scan options. We're interested in the -h (host), -p (port), and -c (clean) options.
@@ -109,6 +110,9 @@ while [ $# -gt 0 ] ; do
109
110
cleanschema=yes
110
111
pgdumpextraopts=" $pgdumpextraopts -c"
111
112
;;
113
+ --accounts-only)
114
+ accounts_only=yes
115
+ ;;
112
116
* )
113
117
pgdumpextraopts=" $pgdumpextraopts $1 "
114
118
;;
@@ -121,12 +125,13 @@ if [ "$usage" ] ; then
121
125
echo " $CMDNAME dumps a PostgreSQL database cluster."
122
126
echo
123
127
echo " Usage:"
124
- echo " $CMDNAME [ -c ] [ -h host ] [ -p port ]"
128
+ echo " $CMDNAME [ -c ] [ -h host ] [ -p port ] [ --accounts-only ] "
125
129
echo
126
130
echo " Options:"
127
131
echo " -c, --clean clean (drop) schema prior to create"
128
132
echo " -h, --host <hostname> server host name"
129
133
echo " -p, --port <port> server port number"
134
+ echo " --accounts-only only dump users and groups"
130
135
echo " Any extra options will be passed to pg_dump."
131
136
echo
132
137
echo " Report bugs to <pgsql-bugs@postgresql.org>."
@@ -179,6 +184,9 @@ while read GRONAME GROSYSID GROLIST ; do
179
184
done
180
185
181
186
187
+ test " $accounts_only " = yes && exit 0
188
+
189
+
182
190
# First we dump the template in case there are local extensions.
183
191
184
192
echo
0 commit comments