Skip site navigation (1) Skip section navigation (2)

-O to remove owner

From: Marc Fromm <Marc(dot)Fromm(at)wwu(dot)edu>
To: "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org>
Subject: -O to remove owner
Date: 2008-07-23 22:48:29
Message-ID: B0D7C0A3F35FE144A70312D086CBCA9B0CEE2F3E@ExchMailbox2.univ.dir.wwu.edu (view raw or flat)
Thread:
Lists: pgsql-admin
I am currently running these to commands in scripts to backup the postgresql databases.

/usr/bin/pg_dumpall -ch 127.0.0.1 -U postgres | gzip > "$backup_dir/postgresql-all-$timeslot-databases.gz"

/usr/bin/pg_dump $i -ch 127.0.0.1 -U postgres | gzip > "$backup_dir/postgresql-$i-$timeslot-database.gz"

I would like to remove all owners from all objects so when I do a restore all objects are owned by postgres. Can I just tack on -O after -U postgres?

/usr/bin/pg_dumpall -ch 127.0.0.1 -U postgres -O | gzip > "$backup_dir/postgresql-all-$timeslot-databases.gz"

Marc

pgsql-admin by date

Next:From: H. HallDate: 2008-07-24 10:58:38
Subject: Re: Catalog
Previous:From: Tom LaneDate: 2008-07-23 19:12:03
Subject: Re: conditional logging based on client

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group