-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
Views: Raw Message | Whole Thread | Download mbox | Resend email
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

Browse pgsql-admin by date

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