Re: [ADMIN] Can a whole server be restored over to another server in a single command?

2009-04-11 Thread Tom Lane
Kevin Bailey writes: > Tom Lane wrote: >> What exactly is the scenario you are trying to have here? Is this >> a poor man's substitute for replication? > Yes. Poor man's replication is what we're after!:o) >> Do you want the destination >> server to include other stuff besides what is com

Re: [ADMIN] Can a whole server be restored over to another server in a single command?

2009-04-11 Thread Kevin Bailey
Tom Lane wrote: Kevin Bailey writes: Can a whole server be restored over to another server in a single command? The output of pg_dumpall is really meant to be loaded into an empty server. Although it has a "--clean" switch, that's got serious limitations and I wouldn't recommend both

Re: [ADMIN] Finding out on exactly what I am stuck

2009-04-11 Thread Péter Kovács
Running the UPDATE on another connection is an interesting suggestion. I hope I will remember it next time I run into a similar problem (or remember reviewing my mail archive :-) ). In the mean time, I found the source of the problem: the client application made SQL calls in invalid sequences. (I

Re: [ADMIN] Can a whole server be restored over to another server in a single command?

2009-04-11 Thread Tom Lane
Kevin Bailey writes: > Can a whole server be restored over to another server in a single command? The output of pg_dumpall is really meant to be loaded into an empty server. Although it has a "--clean" switch, that's got serious limitations and I wouldn't recommend bothering with it. What exact

[ADMIN] How to completely clean out all databases from a PG server and reinitialise from scratch

2009-04-11 Thread Kevin Bailey
How's this for a quick and dirty replication plan? We need to replicate a PG on one server to another server repeatedly. The issues coming up relate to: * Using 'clean' to be able to clean out the data has a problem cos roles can not be dropped due to dependencies. * We'd like to use pg_dump

Re: [ADMIN] Can a whole server be restored over to another server in a single command?

2009-04-11 Thread Kevin Bailey
The problem is that we'd like to repeatedly carry out this action - so existing objects are causing errors. Maybe there can be a combination? Say, completely dropping all databases on the receiving server before reloading from the backup file? Kev -- Sent via pgsql-admin mailing list (pg

[ADMIN] Can a whole server be restored over to another server in a single command?

2009-04-11 Thread Kevin Bailey
Can a whole server be restored over to another server in a single command? Or would it always need some sort of loop. I've tried pg_dumpall --inserts --clean -h $REMOTE -U admin | psql -U postgres template1 but this produces errors such as ERROR: role "admin" cannot be dropped because some