Difference between revisions of "INGe-Migration"

From MPDLMediaWiki
Jump to navigation Jump to search
(INge-Migration)
 
 
(4 intermediate revisions by 2 users not shown)
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 ctxs<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
'''BEFORE !!! you start any reindexing process you need to clean up the KahaDB:<br>
1. (sudo) java -jar migration.jar ous_reindex
sudo rm -rf /tmp/localhost/KahaDB<br>'''
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.
full reindexing (replace -Djboss.home.dir with your wildfly directory)<br>
for this reason you should run this task in a seperate screen and in the background.
1. (sudo) java -jar -Djboss.home.dir=/srv/web/inge/wildfly migration.jar ous_reindex<br>
a. start a new screen: screen + hit return to continue
2. (sudo) java -jar -Djboss.home.dir=/srv/web/inge/wildfly migration.jar ctxs_reindex<br>
b. change into the appropriate directory
3. (sudo) java -jar -Djboss.home.dir=/srv/web/inge/wildfly migration.jar users_reindex<br>
c. sudo bash -c 'nohup java -jar migration.jar items_reindex > <log_file> 2>&1 &'
4. (sudo) java -jar -Djboss.home.dir=/srv/web/inge/wildfly migration.jar items_reindex<br>
d. to detach from the screen: <Ctrl> + a + d


BEFORE !!! you start any reindexing process you need to clean up the KahaDB:
full items reindexing takes up to 8 hours on dev and 3+ hours on qa.<br>
sudo rm -rf /tmp/localhost/KahaDB
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<br>
b. change into the appropriate directory<br>
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<br>


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


for testing purposes some task can be invoked for single resources:
(sudo) java -jar migration.jar single escidoc:<item_id><br>
(sudo) java -jar migration.jar single_user escidoc:<user_id>
will migrate a single item<br>
will migrate and reindex a single user
(sudo) java -jar migration.jar single_reindex item_<item_id><br>
 
will reindex a single item<br>
(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





Latest revision as of 14:07, 10 December 2019

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 ctxs
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/*

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

full reindexing (replace -Djboss.home.dir with your wildfly directory)
1. (sudo) java -jar -Djboss.home.dir=/srv/web/inge/wildfly migration.jar ous_reindex
2. (sudo) java -jar -Djboss.home.dir=/srv/web/inge/wildfly migration.jar ctxs_reindex
3. (sudo) java -jar -Djboss.home.dir=/srv/web/inge/wildfly migration.jar users_reindex
4. (sudo) java -jar -Djboss.home.dir=/srv/web/inge/wildfly 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

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 item_<item_id>
will reindex a single item