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
This is a quick guide on how to transform and load bib-level MARC records into a FOLIO tenant.
- Make sure you have Python 3.13 or higher installed. We recommend using uv for managing various Python versions and your project's dependencies
- You need access to a FOLIO tenant, with the following properties:
- The Gateway url to the tenant (formerly Okapi URL)
- 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
Either use the GitHub button below to create your own repo based on this template
Or clone the repo by running
git clone git@github.com:FOLIO-FSE/migration_repo_template.git
cd migration_repo_template
uv run create_folder_structure.py
Also, you can use this script for creating folder structures for different iterations.
Your repository should look like this:
- Locate the MARC file you want to use, and move it into the
iterations/test_iteration/source_data/instances
folder. - Open up the mapping_files/exampleConfiguration.json file in a text editor and replace the outlined values in the picture below with your values:
- Save the file
- Create virtual environment, install dependencies, and activate
uv sync
uv run python
- Test the installation by showing the help pages
uv run folio-migration-tools -h
- Activate your virtual environment so you can stop typing
uv run
source .venv/bin/activate
- Create a
.env
file for your project's FOLIO credentials
touch .env
- Open the
.env
file and add lines like this
USERNAME=diku_admin
PASSWORD=admin
The following command will invoke the first of the three tasks in the configuration task, the transform_bibs one. Have your password ready.
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.
folio-migration-tools mapping_files/exampleConfiguration.json --base_folder_path ./ post_instances
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