Forum: help

Monitor Forum | Start New Thread Start New Thread
RE: migrate very old gforge to fusionforge [ Reply ]
By: Franck Villaume on 2017-05-30 18:06
[forum:1027]
Hi,

my quick analysis: you find one of the worst and feared scenario where GForge EE and FusionForge have clearly evolved separately.

You need to analyse how the data are displayed on GForge side and generate some data on FusionForge side to see the difference. That will require a second FusionForge server and start to play with it.
Then based on the data, you will be able to build the mapping between fusionforge forum* tables and GForge EE forum* tables. And finally you will need to create specific SQL scripts to do the tranformation of GForge EE forum* tables into an acceptable FusionForge format.

It demontrates also another limitation: you will NOT find the same level of features between GForge and FusionForge since GForge has evolved separately. GForge may provide more feature on some topic than FusionForge. The reverse will be true as well.

RE: migrate very old gforge to fusionforge [ Reply ]
By: Franck Villaume on 2017-05-30 17:21
[forum:1026]
Hi Kenneth,

I take this offline.

Best,


RE: migrate very old gforge to fusionforge [ Reply ]
By: Bursuc Sergiu on 2017-05-30 16:04
[forum:1025]
nerville, I fixed many issues but am stuck now.

For example the forum table is totally different between old and new one and many of the failing queries are because of these differences:
20110211-docman-activityvw.sql
ERROR: column "group_forum_id" specified in USING clause does not exist in right table


The new forum table looks like this:
CREATE TABLE forum (
msg_id integer DEFAULT nextval('forum_pk_seq'::text) NOT NULL,
group_forum_id integer DEFAULT 0 NOT NULL,
posted_by integer DEFAULT 0 NOT NULL,
subject text DEFAULT ''::text NOT NULL,
body text DEFAULT ''::text NOT NULL,
post_date integer DEFAULT 0 NOT NULL,
is_followup_to integer DEFAULT 0 NOT NULL,
thread_id integer DEFAULT 0 NOT NULL,
has_followups integer DEFAULT 0,
most_recent_date integer DEFAULT 0 NOT NULL
);

And the old one:
fusionforge=# \d forum
Table "public.forum"
Column | Type | Modifiers
-------------------+--------------------------+----------------------------------------------------------
forum_id | integer | not null default nextval('forum_forum_id_seq'::regclass)
section | character varying(20) | not null
ref_id | integer | not null
forum_name | text | not null
is_public | boolean | default true
description | text |
send_all_posts_to | text |
thread_count | integer | default 0
message_count | integer | default 0
most_recent_date | timestamp with time zone | default now()
moderation_level | integer | default 0
Indexes:
"forum_pkey" PRIMARY KEY, btree (forum_id)
"forum_sectionrefidispublic" btree (section, ref_id, is_public)
Referenced by:
TABLE "forum_thread" CONSTRAINT "forumid_fk" FOREIGN KEY (forum_id) REFERENCES forum(forum_id) ON DELETE CASCADE


Any ideas?
Thanks!

RE: migrate very old gforge to fusionforge [ Reply ]
By: Kenneth Thorman on 2017-05-30 10:25
[forum:1024]
Hi Nerville

Would you or another be available for hire to do this?
Would it be a fixed price or an hourly rate?
Do you have time to do it?
(working together with izghitu)

Regards
Kenneth

RE: migrate very old gforge to fusionforge [ Reply ]
By: Franck Villaume on 2017-05-29 18:56
[forum:1023]
Hi,

are you familiar with SQL?
Doing a database migration from a proprietary GForge 5.4 Express Edition will require some SQL knowledge.

2 options:
- you are famliar and you start to dig into each SQL script to adapt it to your specific requirement.
- you are not familiar, you can request to someone else to take care of your migration. This "someone else" may request some fees.

That being said, in your case:
- obviously the table "plugins" is missing.
Take a look at ~/db/1-fusionforge-init.sql to find the missing table to create.
- 20100308-drop-forum-attachment-type.sql assumes you have a fusionforge database which is not the case. Then either you create the missing table or you modify it to remove the errors.
- upgrade.php is idempotent. You can run it again and again.


Doing a database migration is not an easy stuff. It may take you several days/weeks to perform a valid migration.
Think about what I wrote on SQL skills.

Cheers.

RE: migrate very old gforge to fusionforge [ Reply ]
By: Bursuc Sergiu on 2017-05-29 18:29
[forum:1022]
Ok, this one part went well. Now the upgrade.php:
[root@community db]# php -f upgrade.php
SQL: SELECT plugin_id, plugin_name FROM plugins
SQL> ERROR: relation "plugins" does not exist
LINE 1: SELECT plugin_id, plugin_name FROM plugins
^
Running script: 20100308-drop-forum-attachment-type.sql
SQL: DROP TABLE forum_attachment_type;
SQL> ERROR: table "forum_attachment_type" does not exist
ERROR: table "forum_attachment_type" does not exist
QUERY: DROP TABLE forum_attachment_type;
Continue executing ([Y]es/[N]o)?
Y
/usr/local/share/fusionforge/db/20100308-drop-forum-attachment-type.sql ran correctly

SQL: INSERT INTO database_changes (filename) VALUES ($1)
SQL> ERROR: current transaction is aborted, commands ignored until end of transaction block
ERROR-3: ERROR: current transaction is aborted, commands ignored until end of transaction block
Open transaction detected!!!

What do I do now?
Thanks!

RE: migrate very old gforge to fusionforge [ Reply ]
By: Franck Villaume on 2017-05-29 17:18
[forum:1021]
Hi,

database_changes exists. no need to recreate it. You can skip it.
About database_startpoint, looks like the COPY command is wrong. Try this instead:
INSERT INTO database_startpoint (db_version, , db_start_date) VALUES ("4.8.50", "20090507");

Then rerun the upgrade.php script.

By the way, your database migration is going to take some time... You will need to modify/create by hand some tables/columns, probably drop some contraints as well.

RE: migrate very old gforge to fusionforge [ Reply ]
By: Bursuc Sergiu on 2017-05-29 16:52
[forum:1020]
Hi,

Thank you for your input.

Up until 5 all went fine. When I try to run the script using: psql fusionforge < script.sql I get this:
-bash-4.2$ psql fusionforge < script.sql
ERROR: relation "database_changes" already exists
ERROR: relation "database_startpoint" already exists
ERROR: value too long for type character varying(10)
CONTEXT: COPY database_startpoint, line 1, column db_version: "4.8.50 20090507"

and the upgrade.php script below:
[root@community db]# php -f upgrade.php
SQL: SELECT plugin_id, plugin_name FROM plugins
SQL> ERROR: relation "plugins" does not exist
LINE 1: SELECT plugin_id, plugin_name FROM plugins
^
ERROR: table 'database_startpoint' is empty.
Run startpoint.php first.


Please let me know what am I doing wrong and how to proceed.

Thanks

RE: migrate very old gforge to fusionforge [ Reply ]
By: Franck Villaume on 2017-05-26 10:15
[forum:1019]
First, let's clarify the difference between Gforge EE and FusionForge. You should read this: https://fusionforge.org/forum/forum.php?forum_id=7
FusionForge is the continuity of the open source gforge flavor. The renaming aims to avoid confusion. Gforge EE is a proprietary software released by GForge Group.
The separation between the open source community and the GForge Group started in 2009 (around gforge 4.6). I don't know when the GForge 5.4 EE has been released but I can bet that the database schema and the features have evolved.

That being said here are few hints to perform your migration:

1) do a fresh install of latest fusionforge on a dedicated server.
https://fusionforge.org/plugins/mediawiki/wiki/fusionforge/index.php/Installing

2) dump your old database

3) drop the freshly created database called "fusionforge" on your dedicated server

4) import your old database into your new server. (beware of data encoding, you may need to tweak your redo your dump several times to get the best encoding)
Be sure that your imported database is called fusionforge. If not, rename it.

5) create a sql script with the following lines:

CREATE TABLE database_changes (
filename text
);
CREATE TABLE database_startpoint (
db_version character varying(10),
db_start_date integer
);
COPY database_startpoint (db_version, db_start_date) FROM stdin;
4.8.50 20090507
\.

6) run this script against your newly imported database.

7) run the upgrade.php script. You should find this script in ~/post-install.d/db/
To run it: php -f upgrade.php
You will encounter errors. I can bet on that too :-)
You will need to anlayse/fix each error.
You can post error here. I will try to help.

8) test your new installation & enjoy FusionForge.

RE: migrate very old gforge to fusionforge [ Reply ]
By: Bursuc Sergiu on 2017-05-25 18:41
[forum:1018]
Hi,

Thanks for your response. I tried the first link already but the most important part at the end is very confusing.

It says to use some startpoin.php and upgrade-db.php scripts but it does not say where to get those scripts from.

The old Gforge I have is 5.4 Express Edition.

Please let me know
Thanks

RE: migrate very old gforge to fusionforge [ Reply ]
By: Franck Villaume on 2017-05-25 10:29
[forum:1017]
Hi,

can you provide more information?
what is your current version? what is old :-)
Is it a GForge CE or AS?

You can look at previous documented experience:
https://fusionforge.org/plugins/mediawiki/wiki/fusionforge/index.php/Migrating_very_old_Gforge

https://fusionforge.org/plugins/mediawiki/wiki/fusionforge/index.php/Migrating/GforgeAS

migrate very old gforge to fusionforge [ Reply ]
By: Bursuc Sergiu on 2017-05-24 17:15
[forum:1016]
Hi,

I have a very old gforge install that I need migrated to fusionforge 6.

Is this possible? Is there any howto or docs on how I can do it?

Please let me know what is the best way to proceed.
THanks in advance.