pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Mauri Sahlberg <Mauri.Sahlberg@claymountain.com>
To: pgsql-admin@postgresql.org
Subject: Backing up users?
Date: Sat, 30 Apr 2005 11:16:59 +0300
Message-ID: <42733EFB.2010908@claymountain.com> (raw)

Hi,

This might be a stupid question as it is not covered in the 7.4.7 and 
probably obvious to all others. Where do the system catalogs live? How 
to back them up? Should I back them up?

The admin manual states that to restore a pg_dumped database you should 
have those users created that will have permission related to objects 
created by pg_restore but gives no clear instructions how to back the 
users up and how to restore them before restoring the database.

According to the manual, pg_dumps are relative to template0 so all 
modifications relative to it will be backed up as well. This gives me a 
reason to believe that users could live in template0  but do they?

What if I just wish to move a single database with it's users to a new 
machine? It would be a disaster to overwrite whole existing system 
catalog on the target machine.

Is it sufficient to select rows from pg_shadow and pg_group that are 
related to the database in question and insert them in the new 
environment? (The rows to use could probably be deducted from other 
catalog tables and views by queries...)

Regards,
Mauri Sahlberg



view thread (3+ messages)  latest in thread

Message-ID: <42733EFB.2010908@claymountain.com>
Permalink:  ../42733EFB.2010908@claymountain.com/
Also on:    postgresql.org/message-id/42733EFB.2010908@claymountain.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: Mauri.Sahlberg@claymountain.com
  Subject: Re: Backing up users?
  In-Reply-To: <42733EFB.2010908@claymountain.com>
  References: <42733EFB.2010908@claymountain.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox