Re: Postrgres data restoration problem (which NG to post to?)

From: Roger Leigh (${roger}_at_invalid.whinlatter.uklinux.net.invalid)
Date: 11/26/03

  • Next message: Roger Leigh: "Re: gtk2.0 combobox"
    Date: Wed, 26 Nov 2003 20:49:45 +0000
    
    

    Jim Cochrane <jtc@shell.dimensional.com> writes:

    > I'm looking for help restoring old postgres databases on a linux system
    > after a reinstall of Redhat (including posgresql). It's the same version
    > of postgres I was using before the resinstall, but I've not been able to
    > get the database server to see the old databases.
    >
    > My main question for now is: What is the best group to post this question
    > in? I could not find a postgres group, nor a linux database group.
    > Once I know what group to post in I'll include more details about the
    > problem.

    There are a whole set of postgresql mailing lists.
    http://www.postgresql.org. There are also some USENET mail<->news
    gateways, but they didn't work for me--perhaps the USENET side is
    read-only?

    For a linux group, comp.os.linux.misc might be a better choice.

    I'd also recommend a copy of the O'Reilly "Practical PostgreSQL" book.

    > And - apologies - since this is probably not the right group. (However,
    > I'm posting here because I suspect that readers of this group would have
    > a good answer as to where to post.)

    Well, there are a few Postgres users lurking here!

    Firstly, what format is the backup in: is it a copy of the database
    cluster, or a proper dump as done with pg_dump?

    If the former, you need to copy the whole lot into
    /var/lib/postgres/data (or wherever the database lives on your
    system), and restart the postmaster. Hopefully everything will
    magically be there.

    For the latter, create a new empty database cluster with initdb.
    Then, use psql to connect to template1, then restore the backup as
    follows:
    use CREATE DATABASE to create a new database (or use createdb).
    use \c to connect to it.
    use \i backup.sql to restore the backup data from "backup.sql".
    Read the first few lines of the backup file to see what SQL it will
    execute, which will tell you whether it requires the database creating
    in advance (IIRC older versions might do this for you, but it's not
    always helpful).

    -- 
    Roger Leigh
                    Printing on GNU/Linux?  http://gimp-print.sourceforge.net/
                    GPG Public Key: 0x25BFB848.  Please sign and encrypt your mail.
    

  • Next message: Roger Leigh: "Re: gtk2.0 combobox"

    Relevant Pages

    • Backup and Restore Files
      ... What is the best way to backup and restore a runtime database file? ... pszDisplayName As String ...
      (microsoft.public.access.gettingstarted)
    • RE: How do I restore from mdf and ldf files?
      ... Tasks -> Backup Database ... Tasks -> Restore Database ... Windows 2003 Server with Latest Service Pack ... Pre-requisites for Sharepoint Backup and Restore: ...
      (microsoft.public.sharepoint.portalserver)
    • Re: Restoring SQL Server Backups
      ... ORIGINAL BACKUP & RESTORE (MSDE Database) ... occurrenceof cachestore flush for the 'Object Plans' cachestore (part ...
      (microsoft.public.sqlserver.server)
    • Re: Restoring SQL Server Backups
      ... ORIGINAL BACKUP & RESTORE (MSDE Database) ... occurrenceof cachestore flush for the 'Object Plans' cachestore (part ...
      (microsoft.public.sqlserver.server)
    • Re: POINT IN TIME RESTORE
      ... This is what you should have done in order to do the restore as you wish: ... > 3- erase data ... > 5- restore database with norecovery ... The BACKUP DATABAE can of course be at an earlier point in time, ...
      (microsoft.public.sqlserver.server)