Right.
As you supposed to know, IMO make a first
pg_restore -l yourbackup.dump > yourbackup.toc
then as you suggested, try to find the 'word' to exclude using grep.
--exclude-schema was specially done to exclude Slony schema. For example, if
there is a "vacuum process" on Slony's tables
while pg_dump is running, you may suffer from deadlock.
________________________________
De : Stuart Bishop <[email protected]>
À : David TECHER <[email protected]>
Cc : slony <[email protected]>
Envoyé le : Mercredi 30 Novembre 2011 8h55
Objet : Re: Re : [Slony1-general] Re : dump, restore & --exclude-schema
On Tue, Nov 29, 2011 at 8:28 PM, David TECHER <[email protected]> wrote:
> I did a little mistake
>
> pg_dump -N _ the_name_of_clustername -Fc -f yourdump.dmp -h... -p... -U....
> ....
>
> First generate the TOC using -l
>
> pg_restore -l yourdump.dmp | grep -v the_name_of_clustername > toc.safe
>
> Then restore using the new toc and -L
>
> pg_restore -L toc.safe yourdump.dmp
Thanks.
This looks rather fragile (I'll need to modify it to catch false
positives with that grep for starters - curses for picking a simple
clustername). Unfortunately I might have to run with it as I noticed
from my commit logs that the other reason for using --exclude-schema
was to avoid the read lock that causes reported database lag to bloat
when doing backups (setting off nagios alerts and waking people up).
Or maybe I should just exclude certain tables to avoid the locking issue?
--
Stuart Bishop <[email protected]>
http://www.stuartbishop.net/
_______________________________________________
Slony1-general mailing list
[email protected]
http://lists.slony.info/mailman/listinfo/slony1-general