Restoring Database created on windows on FreeBSD
Hi
I am very new to FreeBSD (Windows Background), but am busy trying to
implement a PostgreSQL database that I have running in the Windows
environemtn on FreeBSD. Naturally, most of my problems so far have been
geeting to grips with FreeBSD.
Anyway, I am having a problem at the moment. Having being previously
spoilt with the ease of installation on windows, I am sure that I have
missed the boat on something.
I downloaded the latest port for PostgreSQL-8.0.4 from postgresql.org. I
followed the instructions in the documentation and all seemed to work. I
have successfully created "test" databases and have happily managed to
connect to the new PostgreSQL server using psql and pgAdmin III(on
windows). I have now backed up my DB from windows and have created a new
database on the BSD server. When restoring this DB I got a lot of errors
related to some of the system installed functions. I then realised that
the PostgreSQL installation on FreeBSD did not install any of the contrib
modules. I went to the /contrib folder in the port I used to to install
postgreSQL (/usr/ports/database/postgresql-8.0.4/contrib). I excluded
/cube and /mysql from the MakeFile (cube seemed to be failing and why
would I want mysql stuff on PostgreSQL?). I then did a gmake install. All
contribs seemed to install fine. I reran the restore on a clean DB and
most of the errors went away, but I am still getting errors all related to
system functions looking for '$libdir/admin'.
Does anyone know what I could have missed here?
Any help would be appreciated.
Thanks
Craig
On 19.10.2005 08:23, postgresql@bryden.co.za wrote:
I excluded
/cube and /mysql from the MakeFile (cube seemed to be failing and why
would I want mysql stuff on PostgreSQL?). I then did a gmake install. All
contribs seemed to install fine. I reran the restore on a clean DB and
most of the errors went away, but I am still getting errors all related to
system functions looking for '$libdir/admin'.Does anyone know what I could have missed here?
You executed the belonging SQL scripts for the contrib stuff?
Anyway, I'd strongly recommend to only install contrib stuff you
actually plan to use and not clutter up your installation with all and
everything..
Chose the stuff you need, gmake install it, execute the belonging SQL
against template1 and preferable use the custom binary dump format, as
it is much more flexible on restore..
--
Regards,
Hannes Dorbath
On Wed, 2005-10-19 at 08:23 +0200, postgresql@bryden.co.za wrote:
Hi
I am very new to FreeBSD (Windows Background), but am busy trying to
implement a PostgreSQL database that I have running in the Windows
environemtn on FreeBSD. Naturally, most of my problems so far have been
geeting to grips with FreeBSD.Anyway, I am having a problem at the moment. Having being previously
spoilt with the ease of installation on windows, I am sure that I have
missed the boat on something.
Freebsd ports is an amazingly easy way to install software.
I downloaded the latest port for PostgreSQL-8.0.4 from postgresql.org.
the postgresq website does not have Freebsd ports ... just source code
from what I can see.
I
followed the instructions in the documentation and all seemed to work. I
have successfully created "test" databases and have happily managed to
connect to the new PostgreSQL server using psql and pgAdmin III(on
windows). I have now backed up my DB from windows and have created a new
database on the BSD server. When restoring this DB I got a lot of errors
related to some of the system installed functions. I then realised that
the PostgreSQL installation on FreeBSD did not install any of the contrib
modules. I went to the /contrib folder in the port I used to to install
postgreSQL (/usr/ports/database/postgresql-8.0.4/contrib). I excluded
/cube and /mysql from the MakeFile (cube seemed to be failing and why
would I want mysql stuff on PostgreSQL?). I then did a gmake install. All
contribs seemed to install fine. I reran the restore on a clean DB and
most of the errors went away, but I am still getting errors all related to
system functions looking for '$libdir/admin'.Does anyone know what I could have missed here?
It looks like you built from source rather that using the FreeBSD ports
system. Assuming you have a fresh FreeBSD install one would do the
following to achieve your desired end goal.
1) cd /usr/ports/databases/postgresql80-server
2) make && make install
3) pay attention to the notes at the end about tuning your kernel for
shared memory usage (if you plan on having lots of connections)
4) cd /usr/ports/databases/postgresql-contrib
5) make && make install
6) /usr/local/etc/rc.d/010.pgsql.sh initdb
7) /usr/local/etc/rc.d/010.pgsql.sh start
Now if your ports tree is out of date (or even if not) you may want to
do the following instead:
1) pkg_add -r postgresql80-server
2) pkg_add -r postgresql-contrib
Then continue with steps 6 and 7 above. You can verify the package
installation via pkg_info. Also, you may need to build (via ports) or
add (via pkg_add) postgresql80-client.
HTH
Sven
Hi Sven
Thanks for the info. This is a great help.
One question:
Show quoted text
On Wed, 2005-10-19 at 08:23 +0200, postgresql@bryden.co.za wrote:
Hi
I am very new to FreeBSD (Windows Background), but am busy trying to
implement a PostgreSQL database that I have running in the Windows
environemtn on FreeBSD. Naturally, most of my problems so far have been
geeting to grips with FreeBSD.Anyway, I am having a problem at the moment. Having being previously
spoilt with the ease of installation on windows, I am sure that I have
missed the boat on something.Freebsd ports is an amazingly easy way to install software.
I downloaded the latest port for PostgreSQL-8.0.4 from postgresql.org.
the postgresq website does not have Freebsd ports ... just source code
from what I can see.I
followed the instructions in the documentation and all seemed to work. I
have successfully created "test" databases and have happily managed to
connect to the new PostgreSQL server using psql and pgAdmin III(on
windows). I have now backed up my DB from windows and have created a new
database on the BSD server. When restoring this DB I got a lot of errors
related to some of the system installed functions. I then realised that
the PostgreSQL installation on FreeBSD did not install any of the
contrib
modules. I went to the /contrib folder in the port I used to to install
postgreSQL (/usr/ports/database/postgresql-8.0.4/contrib). I excluded
/cube and /mysql from the MakeFile (cube seemed to be failing and why
would I want mysql stuff on PostgreSQL?). I then did a gmake install.
All
contribs seemed to install fine. I reran the restore on a clean DB and
most of the errors went away, but I am still getting errors all related
to
system functions looking for '$libdir/admin'.Does anyone know what I could have missed here?
It looks like you built from source rather that using the FreeBSD ports
system. Assuming you have a fresh FreeBSD install one would do the
following to achieve your desired end goal.1) cd /usr/ports/databases/postgresql80-server
2) make && make install
3) pay attention to the notes at the end about tuning your kernel for
shared memory usage (if you plan on having lots of connections)
4) cd /usr/ports/databases/postgresql-contrib
5) make && make install
6) /usr/local/etc/rc.d/010.pgsql.sh initdb
7) /usr/local/etc/rc.d/010.pgsql.sh startNow if your ports tree is out of date (or even if not) you may want to
do the following instead:1) pkg_add -r postgresql80-server
2) pkg_add -r postgresql-contribThen continue with steps 6 and 7 above. You can verify the package
installation via pkg_info. Also, you may need to build (via ports) or
add (via pkg_add) postgresql80-client.HTH
Sven
---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend
Hi Sven
Thanks for the help. This looks like the kind of info I needed.
One question:
You suggest that I use : pkg_add -r postgresql80-server. If this requires
postgresql80-client, will it automatically download it and install? The
docs I have read suggest this, but maybe you can confirm?
Thanks
Craig
Show quoted text
On Wed, 2005-10-19 at 08:23 +0200, postgresql@bryden.co.za wrote:
Hi
I am very new to FreeBSD (Windows Background), but am busy trying to
implement a PostgreSQL database that I have running in the Windows
environemtn on FreeBSD. Naturally, most of my problems so far have been
geeting to grips with FreeBSD.Anyway, I am having a problem at the moment. Having being previously
spoilt with the ease of installation on windows, I am sure that I have
missed the boat on something.Freebsd ports is an amazingly easy way to install software.
I downloaded the latest port for PostgreSQL-8.0.4 from postgresql.org.
the postgresq website does not have Freebsd ports ... just source code
from what I can see.I
followed the instructions in the documentation and all seemed to work. I
have successfully created "test" databases and have happily managed to
connect to the new PostgreSQL server using psql and pgAdmin III(on
windows). I have now backed up my DB from windows and have created a new
database on the BSD server. When restoring this DB I got a lot of errors
related to some of the system installed functions. I then realised that
the PostgreSQL installation on FreeBSD did not install any of the
contrib
modules. I went to the /contrib folder in the port I used to to install
postgreSQL (/usr/ports/database/postgresql-8.0.4/contrib). I excluded
/cube and /mysql from the MakeFile (cube seemed to be failing and why
would I want mysql stuff on PostgreSQL?). I then did a gmake install.
All
contribs seemed to install fine. I reran the restore on a clean DB and
most of the errors went away, but I am still getting errors all related
to
system functions looking for '$libdir/admin'.Does anyone know what I could have missed here?
It looks like you built from source rather that using the FreeBSD ports
system. Assuming you have a fresh FreeBSD install one would do the
following to achieve your desired end goal.1) cd /usr/ports/databases/postgresql80-server
2) make && make install
3) pay attention to the notes at the end about tuning your kernel for
shared memory usage (if you plan on having lots of connections)
4) cd /usr/ports/databases/postgresql-contrib
5) make && make install
6) /usr/local/etc/rc.d/010.pgsql.sh initdb
7) /usr/local/etc/rc.d/010.pgsql.sh startNow if your ports tree is out of date (or even if not) you may want to
do the following instead:1) pkg_add -r postgresql80-server
2) pkg_add -r postgresql-contribThen continue with steps 6 and 7 above. You can verify the package
installation via pkg_info. Also, you may need to build (via ports) or
add (via pkg_add) postgresql80-client.HTH
Sven
---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend
On Wed, 2005-10-19 at 15:55 +0200, postgresql@bryden.co.za wrote:
Hi Sven
Thanks for the help. This looks like the kind of info I needed.
One question:
You suggest that I use : pkg_add -r postgresql80-server. If this requires
postgresql80-client, will it automatically download it and install? The
docs I have read suggest this, but maybe you can confirm?Thanks
Craig
<please don't top-post as it kills thread continuity>
More than likely it is the other way around. If you pkg_add -r
postgresql80-client it will retrieve and install the server package as
well (it looks for any dependencies a package may have).
Sven