Moving PostgreSQL from C: to D: drive

    • CoreySteel
      CoreySteel
      Bronze
      Joined: 25.10.2006 Posts: 3,366
      My question is really simple. Is it possible to move PostgreSQL database from one drive to another? If yes, how?

      When I first installed PokerStrategy Elephant, PostgreSQL installed too, but it didn't ask me for destination folder or anything like that and it installed automatically in c:\programs files\PostgreSQL
      Now 5 months later I have no space on C:\ drive :( (all in all I had only 10GB free).

      So is it possible to move PostgreSQL and database to another drive, connect it with Elephant and not lose any stats while doing that?

      Thanks for your help.
  • 5 replies
    • 6Wishmaster6
      6Wishmaster6
      Black
      Joined: 16.01.2005 Posts: 3,807
      Yes that is possible, but you have to spend at least some time on it.

      First of all backup you HH´s from your database through the database management, choose a folder to save your HH´s to

      Then deinstall postgreSQl as pointed out in this sticky thread:

      Solution for: "failed to establish a connection to '127.0.0.1' "

      Then reinstall postgreSQl, described in the same thread. Do a manual reinstall, that makes sure, that you can choose the directory where your db will be saved.
    • CoreySteel
      CoreySteel
      Bronze
      Joined: 25.10.2006 Posts: 3,366
      Yeah I saw that thread and I've done exactly like you said.

      It was doing backup for 8 hours or so... Importing now for 7 hours.
      I hope everything will be back to normal :)

      Thanks for the help.
    • CoreySteel
      CoreySteel
      Bronze
      Joined: 25.10.2006 Posts: 3,366
      It was importing for 16 hours and now... There's nothing.
      No stats, no hands at all...

      This is what backup made...


      BTW, I notice there is tons of "titan" files, but I've never played there...

      As it looks like, Stars and Party hands were imported, but there is no sign of them.


      Also, "titan" hands are OK.


      Not sure what these "archive" files are, but as you can see, import is at zero.


      Some other numbers...
      Before I deleted postgres folder it was ~3,5GB big.
      Backup folder was only ~500MB big.
      After this import, postgres fodler is again ~3,5GB big.

      EyePoker is connected with this new database and doesn't find any hands either.

      I tried to import some random hands I still got, but it just detect "duplicates". So I guess this hands are somewhere :P

      I also just closed Elephant and I got this message.
      code:
      OS: Microsoft Windows NT 5.1.2600 Service Pack 2
      .NET Runtime: 2.0.50727.42
      RAM: 2GB
      Processors: 1
      CPU: x86 Family 15 Model 47 Stepping 0: 0/32/2, 2211
      
      Software version: 0.67
      
      (10) Log: 02:38:14.98 -- Logfile set: C:\Documents and Settings\Administrator\Local Settings\Application Data\PokerStrategy\Elephant\log.txt
      (10) Log: 02:38:15.04 -- Logfile cleared: C:\Documents and Settings\Administrator\Local Settings\Application Data\PokerStrategy\Elephant\log.txt
      (10) Log: 06:43:56.73 -- , line 0: Npgsql.NpgsqlException:
      value too long for type character varying(60)
      Severity: ERROR
      Code: 22001
         at Npgsql.NpgsqlState.<ProcessBackendResponses_Ver_3>d__a.MoveNext()
         at Npgsql.NpgsqlState.IterateThroughAllResponses(IEnumerable`1 ienum)
         at Npgsql.NpgsqlCopyInState.SendCopyDone(NpgsqlConnector context)
         at Npgsql.NpgsqlCopyIn.End()
         at PBN.Database.PostgreSQL.ExecuteQueryCopy(CacheItemCollection cacheItemCollection, String commandQuery)
      (10) , line 0: Npgsql.NpgsqlException:
      value too long for type character varying(60)
      Severity: ERROR
      Code: 22001
         at Npgsql.NpgsqlState.<ProcessBackendResponses_Ver_3>d__a.MoveNext()
         at Npgsql.NpgsqlState.IterateThroughAllResponses(IEnumerable`1 ienum)
         at Npgsql.NpgsqlCopyInState.SendCopyDone(NpgsqlConnector context)
         at Npgsql.NpgsqlCopyIn.End()
         at PBN.Database.PostgreSQL.ExecuteQueryCopy(CacheItemCollection cacheItemCollection, String commandQuery)
      


      For the end, maybe just a walkthrough what I've done till now...
      1. Elephant/Database Management/Backup database
      2. Uninstall postgres via that link, deleting postgress folder, deleting application data, deleting user made by postgres.
      3. Manually installing postgres to D:\ drive, creating new user.
      4. Opening Elephant, creating new database, connected with username/password.
      5. Start importing backup


      Any tips/help what should I do? I kinda don't wanna lose 2 years of stats :D
      Thanks for your help in advance.


      edit: As I can see, someone has same problem as me: DB backup
      So let me just answer before this question arise. Yes, I correctly set up screennames. In fact, I didn't change them at all.
      If I try to search my name... Can't find it.

      Now as I can see, there are some players in my DB, but just few of them with around 1-20 hands at most.
    • CoreySteel
      CoreySteel
      Bronze
      Joined: 25.10.2006 Posts: 3,366
      I'm starting to hate Elephant. :D

      I cleared and deleted my previous database and I made a new one.
      I started to manual import all the backup files...
      Those "archive" files were actually Mansion files and they imported just fine and correctly. I needed 6 hours for that.
      Party hands were also imported normal. Needed an hour for that.

      Now problem with PokerStars files occurs... They are imported but hands are simply not shown :rolleyes:
      I played as "LukaSteel" there but this name isn't in database...
      When I try to re-import these hands again, I just get that "DuplicateCount".

      So I'm at the beginning again... Should I clear this database too and just start over again?
      Or is there a way I can get these Star's hand magically to appear?

      I already waste +48hours for this :P
    • CoreySteel
      CoreySteel
      Bronze
      Joined: 25.10.2006 Posts: 3,366
      I just got frustrated and I deleted database again...
      I tried to import backuped Stars hands but they do not work.

      I have to try with some "fresh" ones, but I do not have any money at Stars :O