Home My Page Projects FusionForge
Summary Activity Forums Tracker Lists News SCM Files Mediawiki Hudson/Jenkins

[#848] Import projects from another forge site

2017-04-04 21:03
Submitted by:
David Jia (named007)
Assigned to:
Franck Villaume (nerville)
Target release:
Import projects from another forge site

Detailed description
Hi Team,
We are doing merge work between 2 forge sites.
Now we are using 'merge database' way but it's too complex.
So do we have any feature or tools about this to allow us to import projects from another forge site?
Message  ↓
Date: 2017-05-31 18:00
Sender: Franck Villaume


forge cli is "ready" for testing. I would appreciate your feedback

Howto use it:
To dump a project, use the following command line:
~/bin/forge groupDump [the group id you want to dump] > groupDump-[the group id].json

Once dump as JSON, you can generate a zipfile including all elements (files) using the following command:
~/bin/forge getZipDump groupDump-[the group id].json

You need to run the command as root user to get the files since the files are stored as httpd user.

Reuse an existing dump and modify the generated zipfile.
1) unzip the zipfile into a working directory
2) modify the parameter.json file. You only have to update the value of unix_group_name and group_name to the value you want.
3) run the following command:
~/bin/forge groupImport parameter.json

The forge command line offers also feature to dump subpart of a project such as tracker, docman, ...
Run: ~/bin/forge help help for more information.

Date: 2017-05-08 07:54
Sender: David Jia

Hi Franck,
Yeah, migration in one site for users is OK.
But between 2 sites, there are some users both in each site.
So there will be 2 users have same username but different userid.
I just worry about the confilct of users.

Date: 2017-05-05 05:23
Sender: Franck Villaume

the objective is project migration from 1 forge to another.
the usecase: the user already exists in the targeted forge needs to be handle.
ste migration can be done: project per project.

Date: 2017-05-04 12:37
Sender: David Jia

Hi Franck,
This seem used for project level migration.
How about whole site maigration?
Also, there a big problem with us is user confilct in two site.(Some users have their account in each site.)
And user id is related with trackers, documents and others.
Would you help us about this?

Date: 2017-05-04 12:30
Sender: Franck Villaume

Hi, I'm targeting end of May.
You can already play with: docmanImport, docgroupImport, documentImport, artifactImport, trackerImport

Howto use these functions thru forge cli
Example for trackerImport
1. from the original forge: extract the json file
./forge trackerDump <atid> >trackerDump-<atid>.json
2. from the original forge: generate the zip file
./forge getZipDump trackerDump-<atid>.json
3. on the targeted forge: unzip the generated zip file from the previous command into a working dir: <workdir>
4. on the targeted forge: modify the parameter json file to set the group_id of the targeted group you want to inject the tracker
cd <workdir>; vi parameter.json
5. on the targeted forge: inject the tracker
cd <workdir>;
./forge trackerImport parameter.json

Do not hesitate to comment here. Feedback is welcome.
The import may not be complete. Please identify what data are missing. That will help me.


Date: 2017-05-04 12:20
Sender: David Jia

Hi Franck,
May I know when the import functions would be done?
We are doing a merge work between 2 forge sites and this block us for a long time.

Date: 2017-04-21 05:19
Sender: Franck Villaume


yes, dump is implemented.
import is on-going.
It is schedule to have the same functions as dump to import.
i.e.: documentDump => documentImport
trackerDump => trackerImport

Date: 2017-04-20 05:15
Sender: David Jia

Hi Franck,
Yeah, I see many dump function.
But I only see document import function.
Do we have more import function such as ZIP, groups, artifacts?

Date: 2017-04-06 07:47
Sender: Franck Villaume

it is under heavy development.
However it will work with latest version of FusionForge (code is in the master).
Take a look at ~/src/bin/forge script

Current status: you can export "almost" every thing from an existing FusionForge master installation, project per project, or feature per feature (i.e: you want to export only 1 tracker, or 1 artifact, or 1 document folder, ...)
The import is not yet implemented except injection of 1 document extracted from an existing project into another one.

Field Old Value Date By
status_idOpen2017-10-01 06:09nerville
close_dateNone2017-10-01 06:09nerville
assigned_tonone2017-04-06 07:47nerville
DifficultyNone2017-04-06 07:47nerville
Target releaseNone2017-04-06 07:47nerville