Skip to content

Migration from MySql to GemStone

bruno.buzzi edited this page Oct 17, 2015 · 11 revisions

It is possible to migrate all forms stored in MySql to GemStone/S in this section the migration process is described.
MySql and GemStone/S on the same host
Create the file structure to store attachments, for example:

mkdir orbeonAttachments
mkdir orbeonAttachments/temp
mkdir orbeonAttachments/drafts
mkdir orbeonAttachments/instances
mkdir orbeonAttachments/definitions
mkdir orbeonAttachments/definitions/saved
mkdir orbeonAttachments/definitions/published

To migrate an application named 'myApp' and the form defitition named 'myFirstForm' execute the following:

OrbeonApiConfiguration default baseAttachmentPath: '/orbeonAttachments/'.
(OrbeonMySQLMigrator forApplicationNamed: 'myApp') migrateFormDefinitionNamed: 'myFirstForm'.

Copy all files in orbeonAttachments/definitions/saved to orbeonAttachments/definitions/published.
MySql and GemStone/S on different hosts
Clone the file structure of GemStone/S host in the MySql host:

mkdir orbeonAttachments
mkdir orbeonAttachments/temp
mkdir orbeonAttachments/drafts
mkdir orbeonAttachments/instances
mkdir orbeonAttachments/definitions
mkdir orbeonAttachments/definitions/saved
mkdir orbeonAttachments/definitions/published

To migrate an application named 'myApp' and the form defitition named 'myFirstForm' execute the following:

OrbeonApiConfiguration default baseAttachmentPath: '/orbeonAttachments/'.
(OrbeonMySQLMigrator forApplicationNamed: 'myApp') migrateFormDefinitionNamed: 'myFirstForm'.

Copy the directory structure from MySql host to GemStone/S host.

Note
Copy all files in orbeonAttachments/definitions/saved to orbeonAttachments/definitions/published.
It is possible that MySql does not have permissions to dump the attachments to the configured path to avoid this:
MySql on Centos (for more information search Enhanced Security system SELinux)

chown mysql:mysql /orbeonAttachments 
chcon -Rv --type=tmp_t /orbeonAttachments 

MySql on Ubuntu (search for AppArmor):