Difference between revisions of "INGe-Migration"

From MPDLMediaWiki
Jump to navigation Jump to search
(INge-Migration)
 
Line 1: Line 1:
Migration
==Migration==


build: Run as -> Maven install
build: Run as -> Maven install<br>
(uses Maven shade plugin in phase package)
(uses Maven shade plugin in phase package)<br>


deployable(s): migration.jar + migration.properties from /src/main/resources
deployable(s): migration.jar + migration.properties from /src/main/resources<br>
(both files have to be in the same folder.)
(both files have to be in the same folder.)<br>


extract and edit pubman.properties:
extract and edit pubman.properties:<br>
1. jar xf migration.jar pubman.properties
1. jar xf migration.jar pubman.properties<br>
2. edit pubman.properties
2. edit pubman.properties<br>
3. jar uf migration.jar pubman.properties
3. jar uf migration.jar pubman.properties<br>


full migration:
full migration:<br>
1. (sudo) java -jar migration.jar ous
1. (sudo) java -jar migration.jar ous<br>
2. (sudo) java -jar migration.jar ctx
2. (sudo) java -jar migration.jar ctx<br>
3. (sudo) java -jar migration.jar users
3. (sudo) java -jar migration.jar users<br>
4. (sudo) java -jar migration.jar logins
4. (sudo) java -jar migration.jar logins<br>
5. (sudo) java -jar migration.jar items
5. (sudo) java -jar migration.jar items<br>


full items migrations takes up to 28 hours on dev and 18+ hours on qa.
full items migrations takes up to 28 hours on dev and 18+ hours on qa.<br>
for this reason you should run this task in a seperate screen and in the background.
for this reason you should run this task in a seperate screen and in the background.<br>
a. start a new screen: screen + hit return to continue
a. start a new screen: screen + hit return to continue<br>
b. change into the appropriate directory
b. change into the appropriate directory<br>
c. sudo bash -c 'nohup java -jar migration.jar items > <log_file> 2>&1 &'
c. sudo bash -c 'nohup java -jar migration.jar items > <log_file> 2>&1 &'<br>
d. to detach from the screen: <Ctrl> + a + d
d. to detach from the screen: <Ctrl> + a + d<br>


during the migration process all files will be stored in the current directory:
during the migration process all files will be stored in the current directory:<br>
<cwd>null/standalone/data/inge_files/2018/*
<cwd>null/standalone/data/inge_files/2018/*<br>


BEFORE !!! you start the reindexing process you need to copy the files to their default location:
BEFORE !!! you start the reindexing process you need to copy the files to their default location:<br>
e.g. on qa.inge: /srv/web(inge/standalone/data/inge_files/2018/*
e.g. on qa.inge: /srv/web(inge/standalone/data/inge_files/2018/*<br>


full reindexing
full reindexing<br>
1. (sudo) java -jar migration.jar ous_reindex
1. (sudo) java -jar migration.jar ous_reindex<br>
2. (sudo) java -jar migration.jar ctx_reindex
2. (sudo) java -jar migration.jar ctx_reindex<br>
3. (sudo) java -jar migration.jar users_reindex
3. (sudo) java -jar migration.jar users_reindex<br>
4. (sudo) java -jar migration.jar items_reindex
4. (sudo) java -jar migration.jar items_reindex<br>


full items reindexing takes up to 8 hours on dev and 3+ hours on qa.
full items reindexing takes up to 8 hours on dev and 3+ hours on qa.<br>
for this reason you should run this task in a seperate screen and in the background.
for this reason you should run this task in a seperate screen and in the background.<br>
a. start a new screen: screen + hit return to continue
a. start a new screen: screen + hit return to continue<br>
b. change into the appropriate directory
b. change into the appropriate directory<br>
c. sudo bash -c 'nohup java -jar migration.jar items_reindex > <log_file> 2>&1 &'
c. sudo bash -c 'nohup java -jar migration.jar items_reindex > <log_file> 2>&1 &'<br>
d. to detach from the screen: <Ctrl> + a + d
d. to detach from the screen: <Ctrl> + a + d<br>


BEFORE !!! you start any reindexing process you need to clean up the KahaDB:
BEFORE !!! you start any reindexing process you need to clean up the KahaDB:<br>
sudo rm -rf /tmp/localhost/KahaDB
sudo rm -rf /tmp/localhost/KahaDB<br>




for testing purposes some task can be invoked for single resources:
for testing purposes some task can be invoked for single resources:<br>
(sudo) java -jar migration.jar single_user escidoc:<user_id>
(sudo) java -jar migration.jar single_user escidoc:<user_id><br>
will migrate and reindex a single user
will migrate and reindex a single user<br>


(sudo) java -jar migration.jar single escidoc:<item_id>
(sudo) java -jar migration.jar single escidoc:<item_id><br>
will migrate a single item
will migrate a single item<br>
(sudo) java -jar migration.jar single_reindex escidoc:<item_id>
(sudo) java -jar migration.jar single_reindex escidoc:<item_id><br>
will reindex a single item
will reindex a single item<br>





Revision as of 11:09, 10 August 2018

Migration

build: Run as -> Maven install
(uses Maven shade plugin in phase package)

deployable(s): migration.jar + migration.properties from /src/main/resources
(both files have to be in the same folder.)

extract and edit pubman.properties:
1. jar xf migration.jar pubman.properties
2. edit pubman.properties
3. jar uf migration.jar pubman.properties

full migration:
1. (sudo) java -jar migration.jar ous
2. (sudo) java -jar migration.jar ctx
3. (sudo) java -jar migration.jar users
4. (sudo) java -jar migration.jar logins
5. (sudo) java -jar migration.jar items

full items migrations takes up to 28 hours on dev and 18+ hours on qa.
for this reason you should run this task in a seperate screen and in the background.
a. start a new screen: screen + hit return to continue
b. change into the appropriate directory
c. sudo bash -c 'nohup java -jar migration.jar items > <log_file> 2>&1 &'
d. to detach from the screen: <Ctrl> + a + d

during the migration process all files will be stored in the current directory:
<cwd>null/standalone/data/inge_files/2018/*

BEFORE !!! you start the reindexing process you need to copy the files to their default location:
e.g. on qa.inge: /srv/web(inge/standalone/data/inge_files/2018/*

full reindexing
1. (sudo) java -jar migration.jar ous_reindex
2. (sudo) java -jar migration.jar ctx_reindex
3. (sudo) java -jar migration.jar users_reindex
4. (sudo) java -jar migration.jar items_reindex

full items reindexing takes up to 8 hours on dev and 3+ hours on qa.
for this reason you should run this task in a seperate screen and in the background.
a. start a new screen: screen + hit return to continue
b. change into the appropriate directory
c. sudo bash -c 'nohup java -jar migration.jar items_reindex > <log_file> 2>&1 &'
d. to detach from the screen: <Ctrl> + a + d

BEFORE !!! you start any reindexing process you need to clean up the KahaDB:
sudo rm -rf /tmp/localhost/KahaDB


for testing purposes some task can be invoked for single resources:
(sudo) java -jar migration.jar single_user escidoc:<user_id>
will migrate and reindex a single user

(sudo) java -jar migration.jar single escidoc:<item_id>
will migrate a single item
(sudo) java -jar migration.jar single_reindex escidoc:<item_id>
will reindex a single item