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: (view raw, whole thread or download thread mbox)
Lists: pgsql-admin
I am currently running these to commands in scripts to backup the postgresql databases.

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

/usr/bin/pg_dump $i -ch -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 -U postgres -O | gzip > "$backup_dir/postgresql-all-$timeslot-databases.gz"


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-2017 The PostgreSQL Global Development Group