EDoc VM Migration

MPDL

Checklist

GWDG (Eberhard)

 * clone prepared QA VM server to PROD VM server
 * prepare new FT storage in PROD VM (300GB)
 * clear Sophos support status
 * check license
 * if license&GWDG support is OK, then update API (libs and Perl modules) on servers
 * if Sophos is not supported, migrate to clamav (check pubman)

DB

 * estimate backup/restore time consumption (Vlad)
 * update   (Vlad)
 * pg new backup procedure instead of lvm snapshots (Vlad&Bejamin) Vl

eDoc system env
rcapache2 rcpostgresql rctomcat6 see edoc5 crontab, to be tested
 * setup eDoc app server
 * edocPROD => edocQA
 * setup start/stop scripts by runlevel (3, 5)
 * check crontab jobs
 * test  availability

FT storage

 * copy for 1 day before the migration /X/content/edoc storage to edoc5x
 * prepare  for incremental copy of FT

MPG

 * send MPG info message 1 week before migration

Migration procedure
pg_dump -a -Fc -f edoc_migrated_data.sql -U edoc edoc
 * edoc5
 * dump all data from DB
 * dump all data from DB
 * dump all data from DB
 * NOTE: it takes: dump ~8min, scp ~1-5min; 1.7Gb compressed archive
 * make user table dump and remove passwords

-- backup 1 pg_dump -U edoc --role "edoc" --no-password  --format plain --inserts --verbose --file users_table.sql --table "public.users" "edoc" -- backup 2 select * into users_bak from users -- remove passwords update users set passwd='xxxxxxxxxx' where users.name!='root' -- restore passwords (if needed!!!) update users set passwd=ub.passwd FROM users_bak ub where users.name!='root' and ub.name = users.name select utils.truncate_all_tables('edoc'); select utils.truncate_all_tables('sessions');
 * edocPROD
 * truncate all tables in destination eDoc DB
 * restore DB

pg_restore -U edoc -d edoc -a -j 4 -v edoc_migrated_data.sql
 * NOTE: it took 489m15.331s ~ 8 hours!
 * restore mdata_edoc table:
 * update fts_conf table

UPDATE fts_conf SET mod = 'ftext.fts_id' WHERE name = 'txttid'
 * edoc DB: VACUUM FULL ANALYZE
 * reindex edoc DB
 * for FT storage delta since last FT copy to edoc5x
 * for FT storage delta since last FT copy to edoc5x
 * for FT storage delta since last FT copy to edoc5x
 * for FT storage delta since last FT copy to edoc5x

rsync ....
 * rebuild edoc code with http://edoc.mpg.de as domain name
 * switch DNS entries:
 * http://edoc.mpg.de DNS entry from edoc5 to edocPROD
 * stay unchanged, decision later.
 * check all crontabs!!!

see crontab on PROD
 * check  and
 * testing phase of eDoc functionalities (Martin)
 * NOTE: access only from mpdl IP range for the stage!
 * switch off IP filtering in apache
 * NOTE: access only from mpdl IP range for the stage!
 * switch off IP filtering in apache