Transferred computers - Postgres DB Does Not Exist error
Page 1 of 2 12 LastLast
Results 1 to 10 of 14
  1. #1
    Senior Member
    Join Date
    Oct 2008
    Location
    MoTown
    Posts
    142

    Default Transferring PostgreSQL 9.x from one computer to another - SOLVED

    I backed up my destop DB via PGAdmin and saved that file to my laptop. I"m now on travel, and trying to restore that db and getting the following when I try to restore via PG ADmin:

    C:\Program Files\PostgreSQL\9.0\bin\pg_restore.exe --host localhost --port 5432 --username postgres --dbname \"P1\" --verbose "C:\Documents and Settings\Steve Sundberg\Desktop\P1 DB 122410.backup"
    pg_restore: connecting to database for restore
    pg_restore: [archiver (db)] connection to database ""P1"" failed: FATAL: database ""P1"" does not exist
    pg_restore: *** aborted because of error

    Process returned exit code 1.
    I created a new DB via Holdem manager named P1 (same as my destop db name) and get the above when trying to restore.
    Last edited by ProsperousOne; 01-17-2011 at 05:57 PM. Reason: Solved

  2. #2
    Senior Member
    Join Date
    Oct 2008
    Location
    MoTown
    Posts
    142

    Default

    Update: I tried creating a new DB with a New name "P1 Laptop", and when I try to restore to this db from my desktop db named "P1" I get

    C:\Program Files\PostgreSQL\9.0\bin\pg_restore.exe --host localhost --port 5432 --username postgres --dbname \"P1 Laptop\" --verbose "C:\Documents and Settings\Steve Sundberg\Desktop\P1 DB 122410.backup"
    pg_restore: too many command-line arguments (first is "--verbose")
    Try "pg_restore --help" for more information.
    Note that during this problem I noticed that the registry image path had "/" separators, and I noticed there they are "\", so I changed them all to "\" as follows:

    C:\Program Files\PostgreSQL\9.0\bin\pg_ctl.exe runservice -N "postgresql-9.0" -D "C:\Poker\Postgres data" -w
    Don't know if this is an issue or not.

    Could I just copy the entire Postgres Data Directory to my laptop?
    Last edited by ProsperousOne; 01-01-2011 at 06:58 AM.

  3. #3
    HM Support netsrak's Avatar
    Join Date
    Feb 2009
    Location
    Germany
    Posts
    25,795

    Default

    With which Postgresql version did you create the backup file?
    Postgresql 9 doesn't support restoring 8.3 backups.

    And please don't restore a backup into a database created by HM - this will cause lots of problems.

  4. #4
    Senior Member
    Join Date
    Oct 2008
    Location
    MoTown
    Posts
    142

    Default

    I created both with the version 9.0 of postgreSQL.

    I don't understand your comment
    And please don't restore a backup into a database created by HM - this will cause lots of problems.
    .

    A lot of the FAQs indicate to use the PGAdmin to backup and restore Databases, ie FAQ - Hold'em Manager Poker Tracking Software :: Backup & Restore Database unless I"m completely misunderstanding you
    Last edited by ProsperousOne; 01-01-2011 at 10:25 AM. Reason: added link example

  5. #5
    Senior Member
    Join Date
    Oct 2008
    Location
    MoTown
    Posts
    142

    Default

    Using the above linked method, I get

    C:\Program Files\PostgreSQL\9.0\bin\pg_restore.exe --host localhost --port 5432 --username postgres --dbname \"P1\" --verbose "C:\Documents and Settings\Steve Sundberg\Desktop\P1 DB 122410.backup"
    pg_restore: connecting to database for restore
    pg_restore: [archiver (db)] connection to database ""P1"" failed: FATAL: database ""P1"" does not exist
    pg_restore: *** aborted because of error

    Process returned exit code 1.
    Both Databases were created with Postgres 9.0

  6. #6
    Senior Member
    Join Date
    Oct 2008
    Location
    MoTown
    Posts
    142

    Default

    I'm running Windows XP SP3, and found some threads in the Postgres forums about similar "db does not exist" and a lot mentioned user privileges, and am inferring from this that the posgres user needs "superuser" priviliges.

    So I tried to check the user privileges for posgres on this laptop, but that user doesn't appear when I'm loged in as an admin. HOwever, I am able to log in under user name posgress, and log on.

    I would think logging in under the computer admin account I should see ALL users created on this computer, and be able to change privileges.

    Note that I did edit the pg_hba.conf filt and changed all references to "trust":
    # TYPE DATABASE USER CIDR-ADDRESS METHOD

    # IPv4 local connections:
    host all all 127.0.0.1/32 trust
    # IPv6 local connections:
    #host all all ::1/128 trust

  7. #7
    HM Support netsrak's Avatar
    Join Date
    Feb 2009
    Location
    Germany
    Posts
    25,795

    Default

    What i'm trying to say above:

    If you want to restore a backup you created with pgadmin you need to create the new database via pgadmin too. It will not work if you create a database in the Holdemmanager database and try to restore the backup into this database via pgadmin.

    I'm not sure what your current problem is from all your posts. I think the best is if you arrange a teamviewer session: Please schedule a remote support session with our support. Email support@holdemmanager.net, with a link to this thread and your forum name, so we can setup a Teamviewer session.

  8. #8
    Junior Member
    Join Date
    Mar 2009
    Posts
    3

    Default

    I just upgraded PostgreSQL to postgresql-9.0.2-1-windows_x64 on my main system. I wanted to do a completely clean install, so I made backups (using pgAdmin) of all my 8.x databases, then uninstalled v8.x, wiped out the Postgres user, and deleted the data directory.

    I rebooted, and then performed a fresh install of postgresql-9.0.2-1-windows_x64. Everything installed correctly, but now I'm getting the same errors as ProsperousOne when trying to restore.

    I google'd around a bit, and this problem is definitely occurring due to the escape character (\) before the double quotes (") in the restore command. I know that ProsperousOne did make mention of this, but I'm not sure if he ever figured out the correct command to make the backup work.

    Here's the exact command that needs to be entered:
    Code:
    "C:/Program Files/PostgreSQL/9.0/bin\pg_restore.exe" --host localhost --port 5432 --username postgres --dbname "P1 Laptop" --verbose "C:\Documents and Settings\Steve Sundberg\Desktop\P1 DB 122410.backup"
    You can open up a command prompt and just copy and paste the above command, as long as the DB name and backup names are still the same. The empty DB needs to be created (in pgAdmin) with correct properties ahead of time.

    The only thing I can really think of as to why this is happening is that the most recent pgAdmin tool must have some incorrect hard-coded commands.

  9. #9
    HM Support Patvs's Avatar
    Join Date
    Feb 2009
    Location
    Amsterdam, the Netherlands
    Posts
    33,523

    Default

    @PA_kid
    PostgreSQL 8.4.x is not compatible with 9.0.x
    So you'll need to restore your SQL 8.4.x databases by also re-installing 8.4.x on your computer.

    Or.. reimporting all the original handhistories in a new 9.0.x database.
    Participate in the Beta release of the newest Hold'em Manager version: HM Cloud. Sign-up HERE.

    If you would like to leave some feedback to help us improve the quality of the solutions, and/or the support quality you received, - you can do this here

  10. #10
    Junior Member
    Join Date
    Mar 2009
    Posts
    3

    Default

    Quote Originally Posted by Patvs View Post
    @PA_kid
    PostgreSQL 8.4.x is not compatible with 9.0.x
    So you'll need to restore your SQL 8.4.x databases by also re-installing 8.4.x on your computer.

    Or.. reimporting all the original handhistories in a new 9.0.x database.
    Patvs... is this a general PostgreSQL backward compatibility issue, or is this something specific to HEM? The reason I ask is because I have successfully backed up PT3 databases (sorry to bring up the competition's product on the HEM forum) from 8.4.x and imported into a 9.0.x installation. And by all appearances everything seemed to work just fine afterward.

    Regardless of the compatibility issues with the versions of the database itself, the command line above should work for ProsperousOne's problem. I do believe he said he created the backup in v9.0.x and was restoring back into another v9.0.x installation. Was really just a couple of command line syntax issues preventing the restore from working.

Similar Threads

  1. FATAL 28000: role "postgres" does not exist
    By RoyalTomek in forum Manager General
    Replies: 9
    Last Post: 02-04-2011, 01:29 PM
  2. Import Error when transferring hands between computers
    By invictus in forum Manager General
    Replies: 1
    Last Post: 08-28-2010, 11:30 AM
  3. error FATAL:3D000:database does not exist
    By Kiropp in forum Manager General
    Replies: 2
    Last Post: 05-04-2010, 12:32 PM
  4. Replies: 3
    Last Post: 09-28-2009, 01:32 PM
  5. I transferred 65$ for omaha upgrade
    By K1K0 in forum Manager General
    Replies: 2
    Last Post: 09-03-2009, 12:44 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •