PDA

View Full Version : cannot backup database



cannonwillow
02-18-2011, 11:42 PM
Holdem manager and the HUD works perfect for me in every regard but I cannot backup my database, I get the following error:

http://img39.imageshack.us/img39/5492/backupky.png

I also get an error if I use postgres to try and back up my database. I would like to be able to back up my database somehow.

The Minder
02-19-2011, 01:27 AM
Did you install postgres onto C: drive?

cannonwillow
02-19-2011, 02:19 AM
No. I have holdem manager and postgres both installed on D:, a partition of 2 raid0 harddrives. My operating system is on partition 1 (C) and holdem manager and postgres are on partition 2 (D)

I think I gain performance since postgres quickly fragments the harddrive by having it on a different drive (or partition) from the operating system.

I have another separate phisical internal drive (E), where I archive my handhistorys to and store other stuff and an external drive for backing up various things.

I am using postgres 9.0 instead of 8.4, dont know if this makes a difference.
using windows XP.

I would really like to back it up since I have approximately 1.2 mil hands in my database and have double the chance for drive failure with raided HDs.

I do export my hands regularly as sort of a backup. I would imagine this would be quicker to reimport from just in case I need to make a new database.


If the problem is that the backup/restore program cant find postgres because it only looks on the C: ,then why cant I use the backup option with the pgAmin program, surely it knows where itself is located...

The Minder
02-19-2011, 02:38 AM
well, thar's ya problem. Unless HM and postgres live on C drive you're going to have probs doing a backup/restore thru HM. Not really HM's fault... same prob I believe with PT3.

cannonwillow
02-19-2011, 02:49 AM
I have heard from somewhere that its good to put HEM and postgres on a seperate drive from the operating system. The database takes a lot of space on a HD and needs room to grow.

This is the error I get trying to use pgAdmin to make a backup:


http://img607.imageshack.us/img607/8463/back2n.png

Wierd how it says my database dont exist. pgAdmin will vacuum and reindex the DB with no problems.

The Minder
02-19-2011, 03:03 AM
Wierd how it says my database dont exist. pgAdmin will vacuum and reindex the DB with no problems.

The backup function in HM is trying to access the pgdump file with parameters. pgdump (or the postgres binaries) has to live on C drive but somehow the parms get lost so unless you're a real tech wiz with postgres there's no easy answer... so I've been told.

Agree about doing the backup thru pgadmin.

cannonwillow
02-19-2011, 07:29 AM
I guess the only solution is to reinstall postgres on the C: and reimport all my hands

netsrak
02-19-2011, 11:44 AM
The HM Backup/restore function doesn't support Postgresql 9.x

But i have no idea why the pgadmin backup is not working. Maybe its a 9.x bug?

cannonwillow
02-19-2011, 11:42 PM
I really like have postgres on a seperate drive partition. I want to keep it on D: with the operating system on C:

I dont really need the backup function in holdem manager to work, I can save the conf files seperately. I should be able to just use the backup feature in postgres, if only I could get that to work.

I reinstalled postgres 9.0 (without uninstalling it first though), same results.

Then I tested out making a new database, got the same results.

If I uninstall postgres first and then reinstall it with a new download (in case the original was corrupted somehow), will I lose my database? I would try the same postgres 9.0 first and if that dont work try postgres 8.4

A friend of mine has HEM with postgres 9.0. He can use HEMs, as well as the postgres, backup feature (but everything is on 1 drive in his computer). Dont know if he would be able to successfully restore the backup though. He has never tryed.

I sent a bug report to postgres and will wait to see what they say first.

cannonwillow
02-20-2011, 09:29 AM
Still havent heard back from postgres

I was wrong about my friend with postgres 9.0 and HEM. He only backs up his db using pgAdmin.

But I found this searching the archives at postgres. Maybe this is my problem with why I cant backup my db with pgAdmin

>> The error occurs when I try to backup either one of my PostGIS databases
>> with the default options selected.
>> Format: COMPRESS (No Compress Ratio or Encoding specified)
>> Dump Options #1: Only "Blobs" is checked
>> Dump Options #2: Only "Verbose messages" is checked
>> Objects: All objects are selected (Database, schema, and all tables)
>>
>> My database names contain no quotes or special characters other than a
>> single underscore (example: Test_Exits, Test_GIS, etc.)


>> The error message I receive when trying to backup is the following:
>>
>> C:/Applications/PostgreSQL/9.0/bin\pg_dump.exe --host localhost --port 5432
>> --username "postgres" --format custom --blobs --verbose --file
>> "C:\Applications\Test.backup" \"Test_Exits\"
>> pg_dump: [archiver (db)] connection to database ""Test_Exits"" failed:
>> FATAL: database ""Test_Exits"" does not exist
>> pg_dump: *** aborted because of error
>>
>> Process returned exit code 1.



>> It seemed obvious to me that the escape characters ( \ ) before the double
>> quotes caused the issue. Running the commands in the psql shell without the
>> two backslashes around the database name caused both the backup and restore
>> to work properly. I'm wondering if this issue was introduced by the change
>> made for Ticket#266 <http://code.pgadmin.org/trac/ticket/266>?
>>
>
> I'm able to reproduce this. You're right that the quoting of the
> database name is not good at all. We need a better way to do this. What
> I did is almost working. Still need to fix one issue.
>

Fixed. Thank you.

cannonwillow
02-21-2011, 12:45 PM
Postgres 9.0 has a bug that will not allow backup/restore to work from pgAdmin.

To make a backup I ran cmd and then went to the D:/Program Files/PostgreSQL/9.0/bin directory.

Then just typed in : pg_dump.exe --host localhost --port 5431 --username "postgres" --format custom --blobs --verbose --file "E:\backup1.backup" "HEMd"

This worked

I imagine I could do a restore in a similiar fashion if need be.

netsrak
02-22-2011, 06:16 AM
Thanks for the feedback. Good to know :)

DragonDUG
04-15-2011, 06:42 PM
How about this for a dumbfix.
RENAME you Holdem manager data base using small letters, NO CAPS!!!!:)

Sarek
04-17-2011, 05:34 AM
Is this (no caps) docummented somewhere on Postgres sites?

DragonDUG
04-17-2011, 05:54 AM
I doubt if its documented, it just makes sense and WORKS.
The code generated by the PGADMINIII GUI contains "" if you use caps, but no "" if your name is lowercase.
I was having the same problem and noticed that it worked for the small database 'postgres' but didnt work for my HM100.
It created "HM100" in the command line instead of postgres (no quotes).
so I renamed to hm100 and worked like a champ...
:)

Sarek
04-17-2011, 06:18 AM
Thanks, noted.