Background

Building on my previous blog posts about BagIt—and how it could be used within an archival information system (like Archivematica) for deduplication during AIP updates—I suggested that this approach is also well-suited for implementing a “minimalistic” archival information system (AIS).

So, let’s get to work and start coding!

Minimalistic Archival Information System (MAIS)

This AIS is designed to meet all OAIS requirements; it is primarily intended for those new to the field to explore the concepts and fundamental principles of long-term digital preservation. MAIS draws on my years of experience and utilizes established techniques found in professional archival information systems.

AIPs (Archival Information Packages) are managed using the BagIt standard (RFC 8493). Events are recorded in a human-readable format, compliant with the PREMIS standard, within the bag-info.txt file. AIP identifiers are not assigned automatically; instead, they must be provided by the producer (or the archivist). (If you happen to forget an ID, you can use the search function.)

As of now, MAIS supports:

  • Ingest, including format identification and checksum generation;
  • AIP updates, including deduplication and version control;
  • Functions for technical analysts, such as in-depth AIP inspection;
  • Access functionality to retrieve the latest version;
  • Indexing and searching across AIPs.

MAIS is intended to serve as an example implementation of an archival information system for use in academic studies and teaching. I plan to continue developing MAIS only moderately; I likely won’t be adding many new features, so as not to dilute its minimalist philosophy.

It isn’t quite ready for release yet, but I expect it to be ready in time for Christmas—a little open-source gift under the tree! :)

It is primarily intended to allow digital preservation newcomers, students, and practitioners to engage directly with the foundational principles of long-term archiving without getting bogged down by enterprise software overhead.

How to work with MAIS

Here is a brief introduction to working with MAIS (current state).

Overview

MAIS is a pure CLI program, written in Rust. It could be compiled with daemon support to provide a streamlined Web-API.

Let us check, how to call it:

The first call mais -h results in ff. output:

$ mais -h
Minimalistisches Archivinformationssystem als CLI (nutzt Pairtree, BagIt und SQLite, Deduplizierung via fetch.txt)

Usage: mais [OPTIONS] <COMMAND>

Commands:
  produce       Provides SIP related functions for producers
  administrate  Administration functions, especially provided for technical analysts
  consume       Provides DIP related functions for consumers
  completions   Generates shell completion scripts
  statistics    Generates archive statistics and reporting
  license       Reports the current License
  help          Print this message or the help of the given subcommand(s)

Options:
  -d, --db-path <DB_PATH>            [default: ./archive_index.db]
  -s, --storage-root <STORAGE_ROOT>  [default: ./archive_storage]
  -h, --help                         Print help

As we can see, there are three main commands that reflects the roles defined in the OAIS model: Producer, Administrator, and Consumer. The “statistics” command functions essentially as a reporting tool. Let’s begin by looking at the producer site.

Produce

$> mais produce -h
Provides SIP related functions for producers

Usage: mais produce --id <ID> <COMMAND>

Commands:
  ingest  initialize ingest a SIP to archive
  update  update an existing AIP by ingesting a new version of SIP to archive (Metadata-Update or AIPUpdate)
  help    Print this message or the help of the given subcommand(s)

Options:
  -i, --id <ID>  Identifier to find a SIP/AIP within the system(Allowed: a-z, A-Z, 0-9, -, _)
  -h, --help     Print help

As you can see, MAIS supports ingesting and updating of objects.

$ mais produce -i test ingest -h
initialize ingest a SIP to archive

Usage: mais produce --id <ID> ingest [OPTIONS]

Options:
  -d, --directory <DIRECTORY>   copy given directory as SIP
  -t, --title <TITLE>           title or special name for the sip [default: "Unbenanntes Objekt"]
  -a, --agent <AGENT>           producer agent [default: archivar_cli]
  -m, --mdfiles <MDFILES>       copy given metadata file(s) to SIP
  -M, --mdkeyvalue <KEY=VALUE>  key-value pairs used for SIP related metadata
  -h, --help                    Print help

As you can see, you could provide additional metadata files to a SIP. The DIRECTORY contains the payload-stuff (your intellectual entity).

Here the help for update:

$ mais produce -i test update -h
update an existing AIP by ingesting a new version of SIP to archive (Metadata-Update or AIPUpdate)

Usage: mais produce --id <ID> update [OPTIONS]

Options:
  -d, --directory <DIRECTORY>   copy given directory as SIP
  -a, --agent <AGENT>           producer agent [default: archivar_cli]
  -r, --reason <REASON>         reason for the MD- or AIPUpdate [default: Formatmigration]
  -m, --mdfiles <MDFILES>       copy given metadata file(s) to SIP
  -M, --mdkeyvalue <KEY=VALUE>  key-value pairs used for SIP related metadata
  -t, --title <TITLE>           title or special name for the sip
  -h, --help                    Print help

Consume

$ mais consume -h
Provides DIP related functions for consumers

Usage: mais consume --id <ID> <COMMAND>

Commands:
  access  create a DIP from a requested AIP
  search  
  help    Print this message or the help of the given subcommand(s)

Options:
  -i, --id <ID>  Identifier to find a SIP/AIP within the system(Allowed: a-z, A-Z, 0-9, -, _)
  -h, --help     Print help

The “search” subcommand allows you to look for specific AIPs within the archive. The results include the IDs of the AIPs, which can then be used to generate a DIP.

$ mais consume search -h
Usage: mais consume --id <ID> search --fulltext <FULLTEXT>

Options:
  -f, --fulltext <FULLTEXT>  query string for a full text search
  -h, --help                 Print help

The search functionality has not yet been fully developed. However, the data has already been prepared internally in such a way that accurate search queries will be possible in the future.

$ mais consume access -h
create a DIP from a requested AIP

Usage: mais consume --id <ID> access --destination <DESTINATION>

Options:
  -d, --destination <DESTINATION>  directory where to store the DIP
  -h, --help                       Print help

The DESTINATION is the target directory where the DIP will be stored.

Administrate

Here we find ourselves at the very heart of things—in the technical analyst’s (TA) workspace.

$ mais administrate -h
Administration functions, especially provided for technical analysts

Usage: mais administrate --id <ID> <COMMAND>

Commands:
  reset          reset an AIP to a previous version as a new version
  versions-info  list all AIP versions
  check          checks the AIP including all AIP versions
  help           Print this message or the help of the given subcommand(s)

Options:
  -i, --id <ID>  Identifier to find a SIP/AIP within the system(Allowed: a-z, A-Z, 0-9, -, _)
  -h, --help     Print help

The “reset” command can revert new AIP versions to an earlier state, creating a new version in the process. This behavior is identical to that implemented by Ex Libris Rosetta, ensuring that no history is lost.

To gain an overview of the existing versions of an AIP and the changes made, the technical administrator (TA) uses the “versions-info” command.

If the TA wishes to verify an AIP, they can initiate a deep fixity check using the “check” command.

$ mais administrate check -h
checks the AIP including all AIP versions

Usage: mais administrate --id <ID> check [OPTIONS]

Options:
  -c, --create-new-version  Creates a new AIP version containing the PREMIS fixity audit event
  -a, --agent <AGENT>       auditor agent [default: archivar_cli]
  -h, --help                Print help

As you can see, the TA could decide to create a new version of the AIP containing the result of the check. This is advantageous, as the TA sometimes does not require this for a quick check, meaning no storage space is occupied. However, whenever a new version is created, a corresponding PREMIS event is generated.

Additional commands

A very powerfull command is “statistics”:

$ mais statistics -h
Generates archive statistics and reporting

Usage: mais statistics [OPTIONS]

Options:
  -f, --format <FORMAT>  Output format: ascii, csv, or rsv [default: ascii]
  -h, --help             Print help

Here an example:

$ mais statistics
==================================================
       MAIS ARCHIV-REPORT & VISUALISIERUNG        
==================================================
  Gesamtzahl AIPs (Pakete):      4
  Gesamtzahl Versionen:          9
  Datenbank-Größe (SQLite Index):36.00 KB
--------------------------------------------------
  Speicherbedarf (Vergleich)
    Logisch     : 41.81 MB [████████████████████]
    Dedupliz./Ph: 42.01 MB [████████████████████]
    Ersparnis   : 0 B (0.0%)
--------------------------------------------------
  Integrität (Fixity OK):        7
  Integrität (Fehlerhaft):       1
--------------------------------------------------
  Histogramm: Gesamtspeicher je AIP (Klassen)
    < 1 MB             | ████████████████████ (2)
    1 MB - 100 MB      | ████████████████████ (2)
--------------------------------------------------
  Histogramm: Physischer Speicher je AIP-Version
    v1         | ████████████████████ (41.77 MB)
    v3         | ░░░░░░░░░░░░░░░░░░░░ (183.50 KB)
    v2         | ░░░░░░░░░░░░░░░░░░░░ (31.73 KB)
    v5         | ░░░░░░░░░░░░░░░░░░░░ (27.77 KB)
--------------------------------------------------
  Histogramm: AIPs nach Versionsanzahl
    1 Version(en)   | ████████████████████ (2)
    2 Version(en)   | ██████████░░░░░░░░░░ (1)
    5 Version(en)   | ██████████░░░░░░░░░░ (1)
--------------------------------------------------
  Histogramm: Dateigrößen-Klassen
    1 KB - 1 MB        | ████████████████████ (560)
    < 1 KB             | ███████████████████░ (532)
    1 MB - 100 MB      | ░░░░░░░░░░░░░░░░░░░░ (5)
--------------------------------------------------
  Histogramm: Dateiformat-Verteilung
    "C++               | ████████████████████ (473)
    "Windows           | █████████░░░░░░░░░░░ (220)
    "Cumulate          | ███████░░░░░░░░░░░░░ (163)
    "Buzzic            | █████░░░░░░░░░░░░░░░ (114)
    "Arduino           | ███░░░░░░░░░░░░░░░░░ (61)
    "Markdown"         | █░░░░░░░░░░░░░░░░░░░ (19)
    "Text"             | █░░░░░░░░░░░░░░░░░░░ (15)
    ".properties"      | ░░░░░░░░░░░░░░░░░░░░ (11)
    "text              | ░░░░░░░░░░░░░░░░░░░░ (8)
    "Desktop           | ░░░░░░░░░░░░░░░░░░░░ (2)
    "TADS              | ░░░░░░░░░░░░░░░░░░░░ (2)
    "Portable          | ░░░░░░░░░░░░░░░░░░░░ (2)
    "Python            | ░░░░░░░░░░░░░░░░░░░░ (2)
    "Oleo              | ░░░░░░░░░░░░░░░░░░░░ (1)
    "Perl              | ░░░░░░░░░░░░░░░░░░░░ (1)
    "INI               | ░░░░░░░░░░░░░░░░░░░░ (1)
    "shell             | ░░░░░░░░░░░░░░░░░░░░ (1)
--------------------------------------------------
  Histogramm: Agenten-Aktivität
    archivar_cli       | ████████████████████ (22)
    MinimalAIS/0.2.0   | █████░░░░░░░░░░░░░░░ (6)
--------------------------------------------------
  Histogramm: Event-Verteilung
    format identificat | ████████████████████ (11)
    ingest             | ███████████░░░░░░░░░ (6)
    aip-update         | █████████░░░░░░░░░░░ (5)
--------------------------------------------------
  Histogramm: Dateianzahl-Klassen je AIP
    6 - 20 Dateien     | ████████████████████ (3)
    > 50 Dateien       | ███████░░░░░░░░░░░░░ (1)
==================================================

This was quick guide through current state of MAIS.

I hope you enjoy it! And you know what you can ask Santa for, right? :)

Aktualisiert: