Project

General

Profile

« Previous | Next » 

Revision 3361

pg_dump_vegbien: Added data option for backing up an import's schema

View differences:

pg_dump_vegbien
4 4
selfDir="$(dirname -- "$0")"
5 5

  
6 6
if ! test "$#" -eq 1; then
7
    echo "Usage: env [owners=1] $0 schema >schema.sql"
7
    echo "Usage: env [data=1] [owners=1] $0 schema >schema.sql"
8 8
    exit 2
9 9
fi
10
test -n "$data" && dataOpts='--format=c --compress=9' || dataOpts=--schema-only
10 11
test -n "$owners" && noOwners= || noOwners=1
11 12

  
12 13
(set -x; "$selfDir/../bin/postgres_vegbien" pg_dump --schema="\"$1\"" \
13
--schema-only${noOwners:+ --no-owner --no-privileges})
14
$dataOpts${noOwners:+ --no-owner --no-privileges})

Also available in: Unified diff