User Tools

Site Tools


old:transferring_collections

This page is in the 'old' namespace, and was imported from our previous wiki. We recommend checking for more up-to-date information using the search box.

Transferring Collections

Transferring collections from one Greenstone installation to another can be very simple or reasonably complicated, depending on the circumstances.

Collections live in the collect folder of a Greenstone installation. Each collection has its own folder inside there. Each collection is (almost always) self-contained in its folder.

The simple way to transfer collections is to copy the collection's folder from the original collect folder into the new collect folder. Most of the time, this will be enough to have the new collection working in the new Greenstone installation.

Which folders do I need to copy?

If your collection is very big, you may not want to copy all the folders. The following is a summary of the folders in a collection. Some of them may not be present in a particular collection.

  • import: Contains original source material and metadata
  • etc: Contains collection configuration files
  • archives: Imtermediate state (imported files)
  • building: Built collection, off-line
  • index: Built collection, on-line
  • macros: Collection specific macro files
  • perllib: Collection specific plugins
  • metadata: GLI metadata files
  • collname.col file: A GLI configuration file

If you want to only serve the collection, you need etc, index and macros (if used) folders. If you want to rebuild the collection on the command line, you need import, etc, and perllib (if used) folders. If you want to rebuild the collection using GLI, then you also need the metadata folder and collname.col file.

You never need to copy archives or building unless you have done special customizations where you are linking directly to files in archives, or if you are using incremental building and you don't want to do a full rebuild once the collection gets to its new place.

Complicating factors

There may be complication factors to this. Some of these are listed below. Your situation may encompass one or more or all of these factors.

Transfer between different operating systems

The GDBM files in a collection are endian-specific. For Greenstone 2.81 and later, collections should work on any 32bit operating system without modification. We have modified GDBM to handle both big and small endian files. Prior to that, the endianness of the gdbm file must match that of the OS running Greenstone. Generally, transfer between windows and linux is fine, but transfer to and from a Mac is not. The GDBM database must be rebuilt on the new platform.

If the new version of Greenstone is 2.81, then the endianness of the file shouldn't matter, regardless of which platform it came from.

Transfer between different versions of Greenstone

In general, I think that built collection should copy fine. Some problems may occur if you want to rebuild the collection in the new installation. The configuration file may be slightly out of date if you are copying to a much newer Greenstone installation. The thing to do is to rebuild and see what happens. In GLI, use Expert mode so you can see if there are any errors during collection building. Some potential problems include plugin names and options changing, or other configuration file options changing.

Collections with a customized interface

If the collections have modified interfaces (i.e. customized macro files) then transfer may be a bit tricky. The simple case is where all the modifications have been done in extra.dm (or other files) in the macros folder of the collection, and transfer is between the same version of Greenstone. Just copy the collection and it should be fine.

If the macros are all in the collection, but the Greenstone versions are significantly different, then the macros might not work as expected. Copy the collection over, make a backup of the macro files in the collection, then modify them to get what you want. Look at the main macros in the new installation to see how things are done there.

The hardest situation is where you are copying collections from a heavily modified Greenstone installation. Here, the macro changes are probably in the main macro files, and it may be difficult to see what has changed. Some suggestions are

  • If you want the collections to look exactly the same, consider having a separate Greenstone installation on the new server for these collections. You'll need to install the same version of Greenstone that was used originally, then copy over all the macro files.
  • If you are happy that it doesn't look like the orignal, just copy the collection and use the existing Greenstone installation. You may want to make some small collection specific customisations.
old/transferring_collections.txt · Last modified: 2023/03/13 01:46 by 127.0.0.1