pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
restoring a database from a file copy
2+ messages / 2 participants
[nested] [flat]

* restoring a database from a file copy
@ 2004-06-18 23:42 Chris Fjell <cfjell@bcgsc.ca>
  2004-06-20 15:12 ` Re: restoring a database from a file copy Bruno Wolff III <bruno@wolff.to>
  0 siblings, 1 reply; 2+ messages in thread

From: Chris Fjell @ 2004-06-18 23:42 UTC (permalink / raw)
  To: pgsql-admin

Can a database system be restored just from the data under the 
installation directory?

I backed-up my database using "rsync /var/lib/pgsql <dest_directory>"

Then I upgraded my rpms from 7.3.4 to 7.4. Then I tried to start the 
server as usual and it complained about version conflict (of course).

I removed the 7.4 rpms and went back to 7.3.4 and restared server.

My data are gone - only the template tables are listed.

I copied back from my file backup and this, much to my horror, did not 
restore my database - it's as if the tables are all gone, but the file 
sizes indicate the data are there.

Any way to recreate a catalog (or whatever) from the data?

The server seemed to be down when I copied - can't see what I could have 
done to corrupt the files under /var/lib/pgsql/data/

I couldn't do a pg_dump due to bad OIDs - this was the motivation for 
the upgrade - so I seem to have lost everything.

Any thoughts?

-- 
Chris Fjell





^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: restoring a database from a file copy
  2004-06-18 23:42 restoring a database from a file copy Chris Fjell <cfjell@bcgsc.ca>
@ 2004-06-20 15:12 ` Bruno Wolff III <bruno@wolff.to>
  0 siblings, 0 replies; 2+ messages in thread

From: Bruno Wolff III @ 2004-06-20 15:12 UTC (permalink / raw)
  To: Chris Fjell <cfjell@bcgsc.ca>; +Cc: pgsql-admin

On Fri, Jun 18, 2004 at 16:42:18 -0700,
  Chris Fjell <cfjell@bcgsc.ca> wrote:
> Can a database system be restored just from the data under the 
> installation directory?

Only if the postmaster has been shut down. For live backups you should
be using pg_dumpall.



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2004-06-20 15:12 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2004-06-18 23:42 restoring a database from a file copy Chris Fjell <cfjell@bcgsc.ca>
2004-06-20 15:12 ` Bruno Wolff III <bruno@wolff.to>

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