Welcome, Guest
Please Login or Register.    Lost Password?

DB: How can I copy the database from one system to another?
(1 viewing) (1) Guest
Go to bottomPage: 1
TOPIC: DB: How can I copy the database from one system to another?
DB: How can I copy the database from one system to another? 14 Years, 1 Month ago Karma: 2
This procedure was not designed for end-user use, so it is not as polished as it could be, but this is the procedure that is used by the GO-Global UX installer.

Use the provided PostgreSQL dump command:


# $(GOGLOBAL_ROOT)/postgresql/bin/pg_dump -p 4491 -u goglobalux > file

When you run this command, the output is being redirected to the file, so you don't see the prompts, but the first prompt is for a username -- type 'goglobal'. You will then be prompted for the password, which will not echo -- use 'vnOIoka23sayg2UE0'.

You should then get your prompt back, and have a file called 'file' which is the dump of the database. You'll have to edit the file to remove the "Username: Password:" line at the top. Also, remove the "\connect" line.

Move the dump file to the system you want to install it on. With the goglobalux product shut down (and no PostgreSQL processes running) do the following:

0. Set your ${GOGLOBAL_ROOT} environment variable, using a command similar to one of these (depending on your shell):


# export GOGLOBAL_ROOT=/usr/local/graphon (bash/ksh)
# setenv GOGLOBAL_ROOT /usr/local/graphon (csh)
# GOGLOBAL_ROOT=/usr/local/graphon; export GOGLOBAL_ROOT (sh)

1. Remove any existing database:


# rm -rf postgresql/data/*

2. Recreate an empty database:


# bin/gdbi -dbuser goglobal initialize setpassword start create

3. Import the database data:


# postgresql/bin/psql -U goglobal -p 4491 goglobalux < file

4. Shut down the database:


# bin/gdbi -dbuser goglobal stop

You can then restart the product using the $(GOGLOBAL_ROOT)/etc/goglobalux script.

Caution should be taken to recognize that the GO-Global UX database records the numeric user and group IDs from the UNIX system for its permission database, so if corresponding user and group IDs do not exist on the target system, some icons will appear to be published incorrectly.
Posts: 231
User Offline Click here to see the profile of this user
Gender: Male Birthday: 01/14
The administrator has disabled public write access.
Go to topPage: 1
Moderators: troy, Andyl