http://faq.holdemmanager.com/questions/98/How+to+Import+%26+Export+HandsSee the section called 'Export all files' & do this in HM on your old PC - your HH's will go automatically to a newly automatically created folder here on your old PC:
C:\Program Files\RVG Software\Holdem Manager\HandHistoryExport_(what you named the database originally)
##################
When you have HM & postgreSQL set up on your new PC you can move these HH across into a folder you've created on your new PC (I would use a memory stick, but I don't have millions of hands) & import into a new DB you have created there (see same FAQ above)
If you have loads of HH's I think the best way is to use a network - but I'm not sure
off the HEM forums, hope this helps, gl with it