Merging Collections

You can merge two collections using a command line tool that is available on the CONTENTdm server. If you receive new collection data in CONTENTdm format, this is one way to add new records into a collection.

The tool copies one collection into another and creates unique identifiers for all items in the copied collection. Therefore, if an identical image exists in both collections, there will be two of those images in the merged collections.

Learn about:

  1. Requirements
  2. Tool Location
  3. Syntax
  4. Merging Collections

Requirements

In order to merge collections:

  • Both collections must be from the same version of CONTENTdm (for example, both collections reside on CONTENTdm servers running version 6).

  • Collection field configurations must be identical.

  • You must know the locations of both collections.

  • Optional: Know the number of items in each location.

Tool Location

The migration tool is usually located in the CONTENTdm server bin directory. A common location is:

    \bin

You must execute the tool from within the bin directory.

Syntax

The syntax of the tool that allows you to merge collections is:

batchaddcollection -c destination-directory-of-collection -i directory-of-copied-collection

Merging Collections

Before you merge collections, ensure that you have an up-to-date back-up of both collections.

To merge a collection into another:

  1. Identify which collection you wish to merge into the first.

  2. Obtain locations of each collection. The locations will not necessarily be part of an active CONTENTdm server.

    To obtain server location of a collection:

    1. Open CONTENTdm Administration and select the Collections tab.

    2. Select the collection from the drop-down list. Click Change.

    3. Select Profile.

    4. Note the Directory name.

  3. Tip: Copy the collection's directory name by highlighting the path and pressing Ctrl-C.

  4. Using the command line prompt, navigate to the location of the migration tool.

    For example:

        C:
        cd\bin

  5. In the bin directory, enter:

    batchaddcollection -c destination-directory-of-collection -i directory-of-copied-collection

    For example, if you were merging a collection with the alias nwmaps that was copied onto a CD that and is in your D: drive to a collection with the alias histmaps that is at C:\coll\histmaps, enter:

    batchaddcollection -c C:\colls\histmaps -i D:\nwmaps

  6. Index the merged collection.

    To index the collection:

    Use the command line tool, also located in the bin directory, to index large collections.

    Or:

    1. Open CONTENTdm Administration and select the Items tab.

    2. Select Index.

    3. Change the collection to the recently merged collection name.

    4. Click the Start Index button.

  7. Check to see if the items were successfully copied.

    Tip: If you know the number of items in each collection prior to merging, you can view the total number of items in the newly merged collection to determine whether all items were successfully copied.

The collection that is copied into the other is not deleted automatically. If you wish to delete that collection, you will need to delete the collection from the Collection List. See Managing Collections for information on deleting a collection.