INGe-Migration

From MPDLMediaWiki
Revision as of 16:07, 10 December 2019 by Mwalter (talk | contribs) (→‎Migration)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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