Обсуждение: -O to remove owner

Поиск
Список
Период
Сортировка

-O to remove owner

От
Marc Fromm
Дата:
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
tackon -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