Moving PostgreSQL from a HD to another

PostgreSQL is the database server used to store information. Do you have a question or are you having problem with PostgreSQL? If so, post them here.

Moderator: Moderators

Moving PostgreSQL from a HD to another

Postby Npyu_system » Fri Aug 26, 2011 2:53 am

Hi,

1 year ago when I first installed PT3, it seems that I installed PostgreSQL on the hard drive where the windows system is.

Today, I would like to move PostgreSQL and my database to another hard drive on the same comp.
But I'm not sure how to proceed.

The backup step is not a problem, because I think the "backup" function in the built in database manager should do the job (backup and then restore the datas into the new version of PostgreSQL on the new HD)
am I correct ?

But what about the next steps ?
Do I need to desinstall / reinstall it ?
Do I need to reinstall the same exact version I had on the old HD ?
how do I configure PT3 (that will stay on its current location) to the new database ?

Any danger that I should know about ? :lol:

thank you for your answers.
Npyu_system
 
Posts: 25
Joined: Fri Aug 26, 2011 2:24 am

Re: Moving PostgreSQL from a HD to another

Postby WhiteRider » Fri Aug 26, 2011 4:39 am

There are links to how to do this in the Database / PostgreSQL FAQ.
The easiest way is to uninstall/reinstall to the other drive, moving the PostgreSQL "data" folder across in between, although you would get ultimate performance from having only the database on the other drive (and PostgreSQL still installed on your main Windows drive).

You should install the same major version (e.g. 8.3, any minor version within that is fine) if you're copying the "data" folder across, but if you're doing it with a backup/restore you can install a later version.

You won't need any changes in PT3 - it will connect to whichever PostgreSQL service is running.
Note: you will need to install PostgreSQL on the same port for the databases stored in PT3 to connect automatically, otherwise you'd just need to update the port in PT3.
WhiteRider
Moderator
 
Posts: 54017
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Re: Moving PostgreSQL from a HD to another

Postby Npyu_system » Fri Aug 26, 2011 5:04 am

Thanks a lot for your answer.
and sorry about asking something that is in the howtos (I thought I browsed it though)

WhiteRider wrote:although you would get ultimate performance from having only the database on the other drive (and PostgreSQL still installed on your main Windows drive).


This sounds like the perfect solution indeed. because the size of the data folder on the windows drive is actually my issue.

Is it also explained in some Howto somewhere ?
Or would you mind to clarify how to do that ?

thanks again.
Npyu_system
 
Posts: 25
Joined: Fri Aug 26, 2011 2:24 am

Re: Moving PostgreSQL from a HD to another

Postby Npyu_system » Fri Aug 26, 2011 5:24 am

You were right : I should've take a closer look at the howtos.

I think this topic about putting the data folder on a USB drive should help me moving my data folder to another drive :
viewtopic.php?f=17&t=20345&p=96577#p96460

Thanks again.
Npyu_system
 
Posts: 25
Joined: Fri Aug 26, 2011 2:24 am


Return to PostgreSQL [Read Only]

Who is online

Users browsing this forum: No registered users and 26 guests

cron