Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Below information refers to a deprecated version of the DMS (< version 1.9.5). The current version supports an advanced import script for which you find documentation here.

What follows is merely for the sage of archiving and may in rare cases provide background information on the import process. Do not follow the below steps for DMS versions 1.9.5+

-----------------------------------------------------------------------------------------------------------------------------

Anchor
0
0
Step 0: Prerequisites (for initial import only)

Before running the importer, you should have installed the pi-nuxeo-marketplace-x.x.x-mp.zip package into Nuxeo.

You should also have logged into the Nuxeo GUI, and created a workspace called 'Patricia' and a folder named 'Documents' in 'Patricia' workspace. Importantly, you should have given write permission to the workspace as per section "Configure write access for Patricia Users in Nuxeo GUI" of this page: OUTDATED - DMS Docker Deployment Guide.

Change nuxeo.conf file and make JVM parameters are set properly. For example:

Code Block
JAVA_OPTS=-Xms1024m -Xmx2048m -XX:MaxPermSize=2048m -server -Dfile.encoding=UTF-8

References:

Also execute the following (if needed) in the Patricia database:

Code Block
languagepowershell
titleUpdate Settings
update PAT_DMS_SETTINGS

set DMS_SETTING_VALUE='false'

where DMS_SETTING_KEY='file.import.completed'

 

Anchor
1
1
Step 1: Make the files to be imported (the Documents folder) accessible

The files to be imported must be accessible by the Nuxeo server. In order for the importer to have access to the files, you must mount or copy the old Patricia (P:) file share onto the nuxeo machine. It's more reliable and efficient to copy the files to the Nuxeo server instead of mounting. Therefore, we highly recommend you prepare a local copy of Documents folder first by using rsync or similar tool.

 

Info
titleExample Mount Commands

Example mount command: linux (dom=YOURWINDOMAIN may not be needed):

mount -t cifs //server_ip_address/Patricia -o user=username,pass=mypass,dom=YOURWINDOMAIN /mnt/Patricia

 

Example mount command: MS Windows

net use p: \\server_ip_address\\patricia

Anchor
2
2
Step 2: Download & Configure Import Script

Download pi-nuxeo-importer.zip from here: pi-nuxeo-importer.zip

After the pi-nuxeo-importer.zip is downloaded, unzip it to a folder, e.g: $HOME/pi-nuxeo-importer/

Edit config.py file, and change parameters according to the Nuxeo server information.

 

Anchor
3
3
Step 3: Create Nuxeo Folders

The first step is to create top level Nuxeo folders, for example:

  • /default-domain/workspaces/Patricia/Documents/0
  • /default-domain/workspaces/Patricia/Documents/2
  • /default-domain/workspaces/Patricia/Documents/4

by simply using a script:

 

Code Block
languagebash
cd ~/pi-nuxeo-importer

python create_folders.py

Anchor
4
4
Step 4: Generate Import URLs

In this step, we run a script to generate import URLs in a text file.

 

Code Block
languagebash
cd ~/pi-nuxeo-importer

python generate_urls.py

Anchor
5
5
Step 5: Import the Documents

In this step, we run a script to import documents by using the URLs text file generated in previous step.

 

Code Block
languagebash
cd ~/pi-nuxeo-importer

python import_urls.py

Anchor
6
6
Step 6: Monitor the Logs


You can access the logs via the following command. You can also just use a web browser to accessing: http://127.0.0.1:8080/nuxeo/site/fileImporter/log.

 

Code Block
languagebash
cd ~/pi-nuxeo-importer

python log_monitor.py

You will know that the import is finished when the content of the log remains static, and ends with an import summary referencing 'SimonWatch' toolset, on the console.

Anchor
7
7
Step 7: Run the post import finalizer (for initial import only)

After the import is finished, the import finalization operation should be started (or, it will be run automatically at midnight).

Code Block
curl -H 'Content-Type:application/json+nxrequest' -X POST -d '{"params":{},"context":{}}' -u 'Administrator:Administrator' "http://127.0.0.1:8080/nuxeo/site/automation/SetFileImportComplete"

The expected result is "Import mode closed & post-import services commenced successfully.".

This completes the import - your documents should now be accessible in the Patricia workspace in the DMS.

 
Anchor
7other
7other
Completing step 7 without curl

If you do not have curl installed, you can use RESTClient as an alternative.  The screenshots below action the same RESTful call in a graphical manner:

  1. Set the header to Content-Type   application/json+nxrequest

 

 2. Set the body to:   {"params":{},"context":{}}

 

 

3. Set the auth tab (note select preemptive auth)

 

 

4. Set the request method to post

 

5. After pressing green arrows to execute the request, the result should be "Import mode closed & post-import services commenced successfully.".