Data Migration (LIRMM -> INRAE)

Virtuoso

  • first stop the virtuoso in both servers

  • Do rsync between the two servers: sudo rsync -avzP --numeric-ids stageportal:/srv/ontoportal/data/virtuoso-opensource/ /opt/virtuoso

  • Move the data to the /srv/ontoportal/data/virtuoso

    	mkdir /srv/ontoportal/data/virtuoso
    	cd /opt/virtuoso/database/
    	mv virtuoso.db virtuoso.log virtuoso.pxa virtuoso.trx virtuoso-temp.db /srv/ontoportal/data/virtuoso
  • Change the config of virtuoso.ini in /opt/virtuoso/database/virtuoso.ini

    DatabaseFile = /srv/ontoportal/data/virtuoso/virtuoso.db
    ErrorLogFile = /srv/ontoportal/data/virtuoso/virtuoso.log 
    LockFile = /srv/ontoportal/data/virtuoso/virtuoso.lck
    TransactionFile = /srv/ontoportal/data/virtuoso/virtuoso.trx 
    xa_persistent_file = /srv/ontoportal/data/virtuoso/virtuoso.pxa
    ....
    DatabaseFile = /srv/ontoportal/data/virtuoso/virtuoso-temp.db 
    TransactionFile = /srv/ontoportal/data/virtuoso/virtuoso-temp.trx
  • Change owner to virtuoso user

    chown -R virtuoso:virtuoso /opt/virtuoso
    chown -R virtuoso:virtuoso /srv/ontoportal/data/virtuoso
  • Restart virtuoso in new server systemctl restart virtuoso.service

  • Clear the cache to see it in the browser sudo opclearcaches

Tomcat

Redis

  • Stop redis on both servers

  • Give the user ontoportal the permission to enter the redis_persistent folder with sudo usermod -aG redis ontoportal

  • Rsync sudo rsync -avzP stageportal:/srv/ontoportal/data/redis_persistent/dump.rdb /srv/ontoportal/data/redis_persistent/

  • sudo systemctl restart redis-server-persistent.service redis-server-http_cache.service redis-server-goo_cache.service

Mgrep

  • Rsync the file

    rsync -avzP agroportal:/srv/ontoportal/data/mgrep/dictionary/dictionary.txt /srv/ontoportal/data/mgrep/dictionary

Mgrep-lem

  • Rsync the dictionary file

    rsync -avzP agroportal:/srv/ontoportal/data/mgrep/dictionary/dictionary-lem.txt /srv/ontoportal/data/mgrep/dictionary
  • add this in /etc/systemd/system/mgrep-lem.service

    [Unit]
    Description=mgrep server running on port 55557
    After=network.target
    
    [Service]
    Type=forking
    ExecStart=/opt/mgrep/mgrep --port=55557 -f /srv/ontoportal/data/mgrep/dictionary/dictionary-lem.txt -w /opt/mgrep/word_divider.txt -c /opt/mgrep/CaseFolding.txt
    StandardOutput=syslog
    StandardError=syslog
    SyslogIdentifier=mgrep-lem
    User=mgrep
    Group=ontoportal
    PermissionsStartOnly=false
    TimeoutSec=900
    TimeoutStopSec=10
    
    [Install]
    WantedBy=multi-user.target

Files

  • first stop the virtuoso in both servers

  • remove the repository folder if it exist in /srv/ontoportal/data

  • Do rsync between the two servers: rsync -avzP --numeric-ids stageportal:/srv/ontoportal/data/repository /srv/ontoportal/data/repository

  • Restart the server

  • Clear the cache to see it in the browser sudo opclearcaches

Solr Indexation

  • Reindexing the ontologies, agents and submissions from the admin page

  • for property search and term search we can do

    • Execute this script in ncbo_cron ./bin/ncbo_ontology_index -a -l ./reindexing.log

Ontologies Report

  • Regenerate it from the UI

Outline (agroportal.eu)

Nginx

ubuntu@localhost:/etc/nginx/sites-enabled$ ls
ontologies_api.conf  ontoportal_web_ui.conf  services.agroportal.eu.conf  wiki.agroportal.eu.conf