Moving data base to an external hard drive
Page 1 of 2 12 LastLast
Results 1 to 10 of 12
  1. #1
    Member
    Join Date
    Jul 2008
    Posts
    46

    Default Moving data base to an external hard drive

    I don’t have enough room on my hard disk for my database, so I want to move it to my external hard disk. From what I understand, this is how I should proceed: http://www.holdemmanager.net/faq/afm...aspx?faqid=154

    Can I simply delete the contents of the c:\program files\PostgreSQL\8.2\data folder after I copied it to my external hard drive?

    What about the archived hand histories I have now stored on my D drive? Can I move those to my external hard drive as well?

    I figured it might be best to make a back up of my database first before I proceed with any of these actions. But since I do not have enough free space for a back up on my hard drive, I figured I could save the back up to my external hard drive? Would that work?

    Another thing I have on my mind is whether I should want to do a clean and restore. I read in the forum that the way to free up most space is to export all hands from the database http://www.holdemmanager.net/faq/afm....aspx?faqid=12, then uninstall PostgreSQL via control Panel > Programs And Features then delete the PostgreSQL folder in C:\Program Files and then install PostgreSQL again http://www.holdemmanager.net/faq/afm...aspx?faqid=176 and finally import those hands

    A final thing on my mind is whether I should want to upgrade my postgresql 8.2 version to a newer version when I reinstall it?

    Thanks in advance!

  2. #2
    *** HM3! *** fozzy71's Avatar
    Join Date
    Jun 2005
    Location
    HM Support
    Posts
    32,810

    Default

    Quote Originally Posted by gring000h View Post
    I don’t have enough room on my hard disk for my database, so I want to move it to my external hard disk. From what I understand, this is how I should proceed: http://www.holdemmanager.net/faq/afm...aspx?faqid=154
    Yes, or you could reinstall the same version of postgresql and point the installer to the moved \data folder, or you could export, clean reinstall/upgrade, and import again.

    Can I simply delete the contents of the c:\program files\PostgreSQL\8.2\data folder after I copied it to my external hard drive?
    Yes, if you are sure it is safely copied somewhere else.

    What about the archived hand histories I have now stored on my D drive? Can I move those to my external hard drive as well?
    Yes.

    I figured it might be best to make a back up of my database first before I proceed with any of these actions. But since I do not have enough free space for a back up on my hard drive, I figured I could save the back up to my external hard drive? Would that work?
    You should definitely backup everything, but the exported hands from the HM DB are saved to the same partition as the installation. Can you clear up some free space in other areas, so that you can export your DB to text files? Here are my backup instructions - http://www.holdemmanager.net/forum/s...ad.php?t=20754


    Another thing I have on my mind is whether I should want to do a clean and restore. I read in the forum that the way to free up most space is to export all hands from the database http://www.holdemmanager.net/faq/afm....aspx?faqid=12, then uninstall PostgreSQL via control Panel > Programs And Features then delete the PostgreSQL folder in C:\Program Files and then install PostgreSQL again http://www.holdemmanager.net/faq/afm...aspx?faqid=176 and finally import those hands

    A final thing on my mind is whether I should want to upgrade my postgresql 8.2 version to a newer version when I reinstall it?
    I probably would use this as a good point to upgrade. Make sure you follow my backup cliff notes. Then use these instructions to reinstall postgresql - http://forums.holdemmanager.com/showthread.php?t=20755

    BUT, do not use the installer linked there. Use this installer instead, which will give you the option to change the \data directory to a different partition.

    http://www.enterprisedb.com/products...oad.do#windows

  3. #3
    Member
    Join Date
    Jul 2008
    Posts
    46

    Default

    Thanks for the quick reply!

    The PostgreSQL folder on my C drive is 22GB in size and I have 6GB of free space left on that drive (out of 50GB in total). I'm sure I could clear up a few GB, but clearing out 16GB will be problematic. I assume the back up will have the same file size as the PostgreSQL folder?

  4. #4
    *** HM3! *** fozzy71's Avatar
    Join Date
    Jun 2005
    Location
    HM Support
    Posts
    32,810

    Default

    No. The text files are smaller than the postgresql \data folder, especially if your \data\pg_log folder is full of log files. My DB is about 1.6GB (no log files) and exports to approximately 435MB.


    Logging:

    I would suggest you turn off logging on your new SQL installation as well as these other performance improvements - Top 10: HEM performance increase tips


    To turn off logging, follow these instructions. This is the first thing I do anytime I install SQL for someone.

    - Start > My Computer > Tools > Folder Options > View > UnCheck 'Hide Extensions for known file types' > OK

    - C:\Program Files\PostgreSQL\data\postgresql.conf > Right-Click > Open With.. > NotePad > Check 'Always use this program'

    - Scroll about half way down to ~Lines 245 - 260:

    - The last line of this block of code, for the 'logging_collector', must be changed from On to Off.


    HTML Code:
    ------------------------------------------------------------------------------
    # ERROR REPORTING AND LOGGING
    #------------------------------------------------------------------------------
    
    # - Where to Log -
    
    log_destination = 'stderr'        # Valid values are combinations of
                        # stderr, csvlog, syslog and eventlog,
                        # depending on platform.  csvlog
                        # requires logging_collector to be on.
    
    # This is used when logging to stderr:
    logging_collector = off        # Enable capturing of stderr and csvlog

    File > Save; File > Close

    Start > Programs > PostgreSQL 8.3 > Reload Configuration.


    - Start > My Computer > C:\Program Files\PostgreSQL\data\pg_log, or C:\Program Files (x86)\PostgreSQL\data\pg_log, if you have 64 bit Vista. Delete all files in that folder. And it might be a good idea to empty your recycle bin at that point, or use a 3rd party utility like CCleaner to clean up all your junk/temporary files. You want to do this before you get to the vacuum and defrag process.

  5. #5
    Member
    Join Date
    Jul 2008
    Posts
    46

    Default

    I noticed that the folder with my archived hand histories is pretty large in size as well: 38GB. Is there any cleaning up I could be doing with this folder?

  6. #6
    Member
    Join Date
    Jul 2008
    Posts
    46

    Default

    I had forgotten about this, but apparently I still have multiple databases. I made a screen shot for you to see.

    I use the "HoldemManager2" database. Iirc I ran into some start up problems with my "HoldemManager" database and I assume the other ones are my old PT2 databases...?

    This is probably why the back up for my main database "HoldemManager2" turned out to be only 790MB in size, whereas my PostgreSQL folder is ~22GB in size...?

    If my assumptions are correct, can I then simply delete these databases when I have no use for them anymore? That should clear up a lot of space, right?

    LINK TO SCREENSHOT

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

    Default

    You can delete the not used Holdemmanager* and PTG* Databases but don't touch the postgres database.

  8. #8
    Member
    Join Date
    Jul 2008
    Posts
    46

    Default

    I don't know how to perform step 3 and run the command as administrator...?: http://forums.holdemmanager.com/showthread.php?t=20755

    I use Windows XP and I don't know of any administrator function or password. Is this step necessary? I want to start playing again asap.

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

    Default

    Just type Start -> Run -> cmd and enter the command in the command box.

  10. #10
    Member
    Join Date
    Jul 2008
    Posts
    46

    Default

    Thanks. I'm sorry to keep on bothering you, but I'm just such a n00b when it comes to computer stuff...

    I want to restore my old database as described here: http://www.holdemmanager.net/faq/afm....aspx?faqid=12

    However, I run into problems with this: 5) In the Properties tab, enter a new name and leave everything else except the Encoding as default. For the Encoding you need to use the same value as in the original database (SQL_ASCII for older databases, UTF8 for Postgresql 8.4 databases). Click OK.

    It won't accept the SQL_ASCII encoding: SCREEN SHOT

    How should I proceed?

Similar Threads

  1. Replies: 10
    Last Post: 10-07-2009, 03:00 AM
  2. MySQL On an external hard drive
    By J10BLN in forum Manager General
    Replies: 2
    Last Post: 05-26-2009, 09:45 AM
  3. External Hard Drive
    By Bingo_Babe in forum Manager General
    Replies: 1
    Last Post: 03-05-2009, 12:47 AM
  4. Problem Setting Up External Hard Drive
    By vpbob2000 in forum Manager General
    Replies: 7
    Last Post: 02-03-2009, 02:26 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
  •