Page 1 of 1

can't restore backed-up db to new db on server

PostPosted: Sat Jan 07, 2012 6:21 pm
by Russelldust
I want to copy the PT3 database from my laptop onto a different machine (which I use as a PostgreSQL server on my home network).

So I used PT's backup function to backup the local database onto an external hard disk, and now I'm trying to restore from that backup, with the remote server as the target.

I'm reasonably confident I'm clicking all the right buttons in the restore process. I have 'always prompt before overwrite' selected, I click 'no' to rename the database, then in the 'Edit Database Parameters' dialogue I change 'localhost' to my server name, and enter a new name for the db.

Restoring fails after a couple of minutes:

Code: Select all
Starting Restore...
Creating temporary folder
-------------------
Optional Files
-------------------
-------------------
Databases
-------------------
PT3_2012_01_07_LE-makeshift-db Decompressing... Create......Success.
 Extracting... DB size:psql: could not connect to server: Connection timed out (0x0000274C/10060)
   Is the server running on host "server-xp64" and accepting
   TCP/IP connections on port 5432?

Remove Temp TOC File...Error
Remove Temp Undo Folder...OK
Temp Databases Files...Error
Temp Optional Files...OK
Temp Aggregated Files...OK
Remove Temp Folder...Error
-------------------
Restore Complete. PokerTracker must to be restarted for all changes to take effect.

Help! :(

Re: can't restore backed-up db to new db on server

PostPosted: Sat Jan 07, 2012 6:55 pm
by Russelldust
An excerpt from PokerTracker.log:

Code: Select all
2012/01/07 22:38:24.664: [0000133C][PostgresConnection] Connecting to database: PT3 DB
2012/01/07 22:38:24.739: [0000133C][PostgresConnection] [07468DA0] Successfully connected to: PT3 DB [0x0746a050] (ver = 80317, autotune = N)
2012/01/07 22:38:24.750: [0000133C][PostgresConnection] [07468DA0] Disconnecting from database: PT3 DB
2012/01/07 22:38:24.753: [0000133C][PostgresConnection] [07469970] Disconnecting from database: postgres
2012/01/07 22:39:49.519: [00000A14][PostgresConnection] Connecting to database: PT3_2012_01_07_2238_makeshift-db
2012/01/07 22:39:49.642: [00000A14][PostgresConnection (Error)] Unable to login to database (PT3_2012_01_07_2238_makeshift-db). Reason: FATAL:  database "PT3_2012_01_07_2238_makeshift-db" does not exist
2012/01/07 22:39:49.643: [00000A14][PostgresConnection] Connecting to database: PT3_2012_01_07_2238_makeshift-db
2012/01/07 22:39:49.715: [00000A14][PostgresConnection (Error)] Unable to login to database (PT3_2012_01_07_2238_makeshift-db). Reason: FATAL:  database "PT3_2012_01_07_2238_makeshift-db" does not exist
2012/01/07 22:39:49.716: [00000A14][BackupRestore]  Decompressing...
2012/01/07 22:42:11.441: [00000A14][PostgresConnection] Connecting to database: postgres
2012/01/07 22:42:11.749: [00000A14][PostgresConnection] [0746BFC0] Successfully connected to: postgres [0x0746b270] (ver = 80317, autotune = N)
2012/01/07 22:42:11.946: [00000A14][wxWidgets] Error: can't open file 'D:/Program Files (x86)/PostgreSQL/8.3/data/postmaster.opts' (error 3: the system cannot find the path specified.)
2012/01/07 22:42:12.173: [00000A14][wxWidgets] Error: can't open file 'D:/Program Files (x86)/PostgreSQL/8.3/data/postmaster.opts' (error 3: the system cannot find the path specified.)
2012/01/07 22:42:12.238: [00000A14][BackupRestore]  Create...
2012/01/07 22:42:24.874: [00000A14][BackupRestore] ...Success.

2012/01/07 22:42:24.996: [00000A14][BackupRestore]  Extracting...
2012/01/07 22:42:26.960: [- Main -][PostgresConnection] Connecting to database: postgres
2012/01/07 22:42:27.030: [- Main -][PostgresConnection] [0012DCF8] Successfully connected to: postgres [0x07468a90] (ver = 80317, autotune = N)
2012/01/07 22:42:27.037: [- Main -][PostgresConnection (Error)] Unable to execute query: SELECT pg_size_pretty(pg_database_size('PT3_2012_01_07_2238_makeshift-db'));; Reason: Fatal Error (ERROR:  database "PT3_2012_01_07_2238_makeshift-db" does not exist )
2012/01/07 22:42:27.038: [- Main -][PostgresConnection] [0012DCF8] Disconnecting from database: postgres

Re: can't restore backed-up db to new db on server

PostPosted: Sat Jan 07, 2012 7:25 pm
by Russelldust
For clarity:

PT3 DB is just another db that happens to be already on the server. I presume the first bit I pasted from the log file is where PT enumerates the dbs on the server? (I clicked the 'browse existing databases' button to make sure my laptop could connect to the server.)

PT3_2012_01_07_2238_makeshift-db is the new name I've specified for the target database I want PT to create on the server. I can't find any part of PokerTracker.log where it says it's tried to create the db but failed, so I'm puzzled by the numerous 'database "PT3_2012_01_07_2238_makeshift-db" does not exist' errors.

Re: can't restore backed-up db to new db on server

PostPosted: Mon Jan 09, 2012 3:12 pm
by kraada
What was the original name of the database when it was backed up?

Re: can't restore backed-up db to new db on server

PostPosted: Mon Jan 16, 2012 12:22 am
by Russelldust
PT3_2012_01_07_LE_makeshift-db

Re: can't restore backed-up db to new db on server

PostPosted: Mon Jan 16, 2012 3:58 am
by WhiteRider
Is PostgreSQL installed on the D: drive in this computer?
Does 'D:/Program Files (x86)/PostgreSQL/8.3/data/postmaster.opts' exist? What about that folder?

Re: can't restore backed-up db to new db on server

PostPosted: Mon Jan 16, 2012 11:16 am
by Russelldust
Yes, and yes. The postmaster.opts file is there in the D:\Program Files (x86)\PostgreSQL\8.3\data folder.