Skip to content

This repo contains examples of all data and settings needed for migrating a library's catalog from its source system to FOLIO Inventory and SRS

Notifications You must be signed in to change notification settings

FOLIO-FSE/migration_repo_template

Repository files navigation

Migration Repo template

This repo is a template repository for the files needed for migrating Inventory data from a source system into FOLIO,

It contains example data and mapping files to help you kick-start a data migration into FOLIO

Getting started/ Giving it a try

This is a quick guide on how to transform and load bib-level MARC records into a FOLIO tenant.

Prerequisites

  • Make sure you have Python 3.9 or higher installed. We recommend using pyenv for managing various Python versions
  • You need access to a FOLIO tenant, with the following properties:
    • The OKAPI url to the tenant
    • The Tenant id for the tenant
    • A username and password for a user with the right permission sets
  • A file of MARC21 Bib records in .mrc (binary) format

1. Create a git repository for your settings and data

Create a repo or clone this one

Either use the Github button below to create your own repo based on this template
image

Or clone the repo by running

git clone git@github.com:FOLIO-FSE/migration_repo_template.git

Step into the repo and create the example folder structure py running

cd migration_repo_template
sh create_folder_structure.sh

Your repository should look like this:
image

(If you are on Windows, create a similar folder structure in the way you are familiar with)

2. Add your data, and configure the settings

  1. Locate the MARC file you want to use, and move it into the iterations/test_iteration/source_data/instances folder.

  2. Open up the mapping_files/exampleConfiguration.json file in a text editor and replace the outlined values in the picture below with your values:
    image

  3. Save the file

3. Install the tools and make sure they can run

Using poetry

  1. Create virtual environment, install dependencies, and activate
poetry install
poetry shell
  1. Test the installation by showing the help pages
python -m folio_migration_tools -h

Using venv

  1. Create and activate a virtual environment First, go to the root of the repository. Then run the following
python -m venv ./.venv     # Creates a virtual env in the current folder
source .venv/bin/activate  # Activates the venv
  1. Install using pip:
python -m pip install -r requirements.txt
  1. Test the installation by showing the help pages
python -m folio_migration_tools -h

Transform the bibs into FOLIO Instances and SRS records

The following command will invoke the first of the three tasks in the configuration task, the transform_bibs one. Have your password ready.

python -m folio_migration_tools mapping_files/exampleConfiguration.json --base_folder_path ./ transform_bibs

Congratulations! You have now completed the first step. Take a lookaround in the results and reports folders in iterations/test_iteration to get an understanding for what has happened.

Post the Instances into FOLIO Instances and SRS records

python -m folio_migration_tools mapping_files/exampleConfiguration.json --base_folder_path ./ post_instances

Post the SRS (MARC) Records into FOLIO

python -m folio_migration_tools mapping_files/exampleConfiguration.json --base_folder_path ./ post_srs_bibs

Now, you can go off and explore the records in the FOLIO tenant! Make sure to check all the reports and lists of failed records in the reports and results folders!

For complete documentation on how to run the process, refer to Read the Docs (under construction)

About

This repo contains examples of all data and settings needed for migrating a library's catalog from its source system to FOLIO Inventory and SRS

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published