Skip to main content
ExLibris
  • Subscribe by RSS
  • ExLibris Dev

    Importing MetaLib e-Shelf Records to Primo

    With Primo 3.1.2 and later releases, you can use the import_eshelf_metalib.sh script to import MetaLib e-Shelf records into Primo.
    To import MetaLib e-Shelf records to Primo:
    1. Run the export script in MetaLib.
      MetaLib creates two types of files: a list of all exported records and an XML file per record. For more information, see the MetaLib System Configuration and Administration Guide.
    2. Transfer all of the files that were exported on the MetaLib server to the Back Office server. The files should be added to a directory from which the Primo import script can read.
    3. In the Back Office server, enter the following commands to access the imshelf directory:
      be_profile
      cd imshelf
    4. Add the following parameters to the ImportMetalibBasket.properties file.
      • source_path – The full path of the list of records file.
      • source_folder – The full path of the folder in which the XML files per record are stored.
      If the source folder is the same as the directory that contains the list of records file, it is not necessary to enter this parameter.
    5. Enter the following command to open the hibernate.cfg.xml file:
      vi hibernate.cfg.xml
    6. Modify the following lines in the file:
      <property name="hibernate.connection.url">jdbc:oracle:thin:@{hostname of DB server}:{DB port}:{SID}</property>
      <property name="hibernate.connection.username">{oracle login}</property>
      <property name="hibernate.connection.password">{oracle password}</property>
      For example:
      <property name="hibernate.connection.url">jdbc:oracle:thin:@il-primo12:1521:prm2</property>
      <property name="hibernate.connection.username">P42_PRM00</property>
      <property name="hibernate.connection.password">P42_PRM00</property>
    7. Enter the following commands to create the backup files for the e-Shelf tables:
      be_bin
      backup_basket_tables.sh <target directory of backup file>
      If you need to restore the backup files, enter the following commands:
      be_bin
      restore_basket_tables.sh <target directory of backup file>
      This script will check to see that the backup file exists and then request confirmation to continue. Upon confirmation, it will delete the e-Shelf from the database and then import it from the backup file.
    8. Enter the following command to perform the import:
      be_bin
      import_eshelf_metalib.sh
      For Windows, enter the following script:
      primo_home\system\publish\bin\import_eshelf_metalib.bat
      The system will display the log on the screen and save it in the following file:
      be_log/publish_server.log
    //doorbell.io feedback widged