Denbun POP version Manual
User's Manual | Administrator's Manual | Installation Guide | Initial Settings Guide
Back to Menu
 

Migration from the version for PostgreSQL 8.2 to PostgreSQL 8.3 (Windows).

This guide describes how to migrate from Denbun POP V2.0P R4.3(with PostgreSQL version 8.2 ) to Denbun POP V2.0P R4.3(with PostgreSQL version 8.3). If you use the V2.0P R4.3 or lower, please upgrade it to V2.0P R4.3, and then follow the procedure of this guide.
If your version is Denbun POP V2.0P R4.3 which supports PostgreSQL8.3, you do not have to migrate it.

Note
This guide is written for users who have the knowledge about Windows, Apache HTTP Server, PostgreSQL, etc. Please refer the appropriate documentation for installation and operation of each product.
Since this guide supposes working on Windows, the procedure and screen shot, etc. might be different from customer's environment.

Prerequisites
This migration procedure assumes that the following environments.
- The migration source and destination must be on the same servers.
- Only Denbun database exists on PostgreSQL.
- Denbun and the packages required for Denbun (PostgreSQL, MeCab, MeCab dictionary) are not used by other applications (These packages can be uninstalled).
- There is no access to Denbun (* Scheduler is stopped).
- The current version of Denbun is V2.0P R4.3(for PostgreSQL version 8.2)
- The version of Denbun after migration is V2.0P R4.3(for PostgreSQL version 8.3)
- The administrator for PostgreSQL is "postgres".
- PostgreSQL8.2 is installed in "C:\Program Files\PostgreSQL\8.2".
- PostgreSQL8.3 is installed in "C:\Program Files\PostgreSQL\8.3".
- Denbun is installed in "C:\Inetpub\Scripts\dnpwml".
- If the web server is Apache, Apache is installed in "C:\Program Files\Apache Software Foundation\Apache2.2\cgi-bin\dnpwml".
* This guide assumes that Denbun is installed in "C:\Inetpub\Scripts\dnpwml".


1. Preparation (Taking Backup)
If you are not logged on as an administrator, please log off and log on as administrator.

Please backup the following data before conversion.
It assumes that the data is backed up to "C:\tmp" directory.
- Backup the database
- Backup the users' photo

1-1. Backup the database
Backup the current database which needs migrating.
Use the following command to back up the database.

# cd "C:\Program Files\PostgreSQL\8.2\bin"
# pg_dump.exe –U postgres -b -Fc dnpwmldb > C:\tmp\dnpwmldb82.pgdmp

1-2. Backup the users' photo
If you register users' photo using Management - User List - Add (Edit) User, please back up the directory "C:\Inetpub\Scripts\dnpwml\dnpwmlfile" for the photos.


2. Uninstall Denbun for PostgreSQL version 8.2
Please refer this guide for uninstall Denbun for PostgreSQL version 8.2.

  • Even if you uninstall it, the user and data created by the installation remain. Please the directory "C:\Inetpub\Scripts\dnpwml".
  • Denbun POP for PostgreSQL8.3 cannot be installed if PostgreSQL is installed. Please uninstall PostgreSQL too.
  • Even if you uninstall PostgreSQL8.2, the user and data created by the installation remain. Please delete the data if necessary. (In the default settings, the data exists in "C:\Program Files\PostgreSQL\8.2\data").


3. Install Denbun for PostgreSQL version 8.3
Please install Denbun POP V2.0P R4.3 which supports PostgreSQL8.3.
To install Denbun, please refer this guide.

[Download] Denbun POP V2.0P R4.3 for PostgreSQL version 8.3


4. Data migration
Migrate the data you back up in the procedure 1 to the data for Denbun POP for PostgreSQL version 8.3.
Please upload the file (dnpwmlshifttoolpg83.zip) required for the restoring the data, and expand it under "C:\tmp" directory. A directory named "dnpwmlshifttool" is created.

4-1. Migrate the database
Execute the following command before restoring the data you created at the procedure 1.1.

# cd "C:\Program Files\PostgreSQL\8.2\bin"
# psql.exe –d dnpwmldb –U dnpwml < C:\tmp\dnpwmlshifttool\pre.sql
# Password for user dnpwml:

Then, restore the data you created at the procedure 1.1.

# pg_restore.exe –a -U postgres -Fc -d dnpwmldb < C:\tmp\dnpwmldb82.pgdmp

* The following errors are displayed when restoring. Please ignore them because the errors occured due to there is no table for "tsearch2" for PostgreSQL8.2 in PostgreSQL8.3.

pg_restore: [archiver (db)] Error while PROCESSING TOC:
pg_restore: [archiver (db)] Error from TOC entry 2119; 0 180605 TABLE DATA pg_ts_cfg postgres
pg_restore: [archiver (db)] could not execute query: ERROR: relation "pg_ts_cfg" does not exist
Command was:
COPY pg_ts_cfg (ts_name, prs_name, locale) FROM stdin;
pg_restore: [archiver (db)] Error from TOC entry 2120; 0 180610 TABLE DATA pg_ts_cfgmap postgres
pg_restore: [archiver (db)] could not execute query: ERROR: relation "pg_ts_cfgmap" does not exist
Command was: COPY pg_ts_cfgmap (ts_name, tok_alias, dict_name) FROM stdin;
pg_restore: [archiver (db)] Error from TOC entry 2121; 0 180615 TABLE DATA pg_ts_dict postgres
pg_restore: [archiver (db)] could not execute query: ERROR: column "dict_name"
of relation "pg_ts_dict" does not exist
Command was: COPY pg_ts_dict (dict_name, dict_init, dict_initoption, dict_lexize, dict_comment) FROM stdin;
pg_restore: [archiver (db)] Error from TOC entry 2122; 0 180620 TABLE DATA pg_ts_parser postgres
pg_restore: [archiver (db)] could not execute query: ERROR: column "prs_name" of relation "pg_ts_parser" does not exist
Command was: COPY pg_ts_parser (prs_name, prs_start, prs_nexttoken, prs_end, prs_headline, prs_lextype, prs_comment) FROM stdin;
WARNING: errors ignored on restore: 4

Execute the following command after restoring.

# psql.exe –d dnpwmldb –U dnpwml < C:\tmp\dnpwmlshifttool\after.sql
# Password for user dnpwml:

Please delete an unnecessary file at the end.
- pre.sql
- after.sql
- dnpwml82.pgdmp

4-2. Move the Photo directory
Move the directory you created at the procedure 1-2. to directory "C:\Inetpub\Scripts\dnpwml".


5. Complete migration
The migration from Denbun POP for PostgreSQL version 8.2 to Denbun POP for PostgreSQL version 8.3 completed.





 
Copyright (C) 2008-2011 NEOJAPAN,Inc. All Rights Reserved.