Skip to main content

Migrating Instances from NavVis IndoorViewer on Ubuntu

  • Installed Docker (version 17.04.0+ or newer) and Docker Compose
  • The NavVis IVION docker-compose files and .env files. For instructions on how to get these see the Docker Installation documentation.
Follow these steps to migrate a NavVis IndoorViewer instance running on Ubuntu to NavVis IVION on Docker:
  1. Unpublish your instance to ensure that no changes are made during the migration.
  2. Get the NavVis IVION Docker images.
  3. Edit the name of your instance in the .env file and configure other variables as required. You should use the database owner and database name from you existing instance. You can find this information in /etc/NavVis/instance/\${INSTANCE_NAME}/application.yaml.
  4. Create your \${STORAGE_PATH} folder in the .env file and move, link or copy your existing data files into the directory \${STORAGE_PATH}/\${INSTANCE_NAME}, (e.g. /srv/navvis/data/iv/[log|data|upload]) by running:
    # Create storage and instance directory assuming \${INSTANCE_NAME} is "iv"
    mkdir -p ./storage/iv
    # Recreate as symbolic links to your existing folders
    ln -s /srv/web/data ./storage/iv/data
    ln -s /srv/web/upload ./storage/iv/upload
    Tip: You can use navvis-instance list to find the storage directory and the database name.
  5. Shut down the server application by running:
    sudo navvis-instance stop \${INSTANCE_NAME}
  6. Backup your existing database by running:
    sudo -iu postgres pg_dump {existing db name} > ./backup.bak
    If you are not migrating on the same host, copy the backup file to the new host.
  7. Restore the database onto your Docker host:
    # Start database image
    docker-compose up -d db
    # Restore previous backup into newly created database. Replace "iv" with your \${POSTGRES_DB}!
    docker-compose exec -T -u postgres db psql -x iv < ./backup.bak
    # Optionally now remove the redundant backup file
    rm ./backup.bak
  8. Disable Jetty by running:
    sudo systemctl stop jetty9
    sudo systemctl disable jetty9
  9. To check that you have successfully disabled Jetty, run:
    sudo systemctl list-units --type service
  10. Start the web server by running:
    docker-compose up -d iv
    Note: If you want to migrate multiple instances, replace the instance name and duplicate the service definitions in docker-compose.yml for each instance and make sure to use different port numbers for each instance.