Digital files decay quietly. A disk sector fails, a copy job is interrupted, a sync tool overwrites the wrong version, or a well-meaning colleague opens a master TIFF and saves it with a new color profile. Nobody notices until someone needs the file. Fixity checking is how you notice first. BagIt is one of the simplest ways to make fixity part of everyday work.
This guide covers what fixity means, how BagIt packages work, which tools to use, and how to build a checking routine that a small team can sustain.
What fixity means
Fixity is the property of a file being unchanged. You establish it by computing a checksum, a short string derived from every bit of the file, and storing it. Later, you compute the checksum again and compare. If the values match, the file is the same. If they differ, something changed, and you need to find out what.
Checksums answer only one question: is this file identical to the one I recorded? They do not tell you whether the file was correct to begin with, whether it can still be opened, or who changed it. That is why fixity is one part of preservation, alongside replication, format monitoring and documentation.
| Algorithm | Typical use | Notes |
|---|---|---|
| MD5 | Legacy manifests, quick integrity checks | Fine for detecting accidental corruption, not for security against tampering |
| SHA-1 | Older systems | Also weak against deliberate collisions, now generally avoided for new work |
| SHA-256 | Default choice for new preservation work | Widely supported and strong against tampering |
| SHA-512 | Where policy requires a longer digest | Often faster than SHA-256 on 64-bit hardware |
Many institutions record two algorithms during a transition, for example MD5 for compatibility with existing systems and SHA-256 for the future. That costs little extra computing time and avoids a later migration of every manifest.
How BagIt works
BagIt is a packaging convention that grew out of work at the Library of Congress and was published as RFC 8493 in 2018. A bag is just a directory with a known layout. It needs no special software to open, which is the main reason it has lasted.
bagit.txtdeclares the BagIt version and the character encoding of the tag files.data/holds the payload, the files you actually care about, in whatever folder structure you like.manifest-sha256.txt(or another algorithm) lists a checksum and path for every payload file.bag-info.txtis optional but useful. It holds simple metadata such as the source organization, contact, bagging date and a Payload-Oxum value that records total size and file count.tagmanifest-sha256.txtis optional and lists checksums for the tag files themselves, so changes to the manifest can be detected too.
A bag is complete when every file listed in the manifest is present and no unlisted files sit in the payload. It is valid when it is complete and every checksum matches. Those two words are the whole test.
Tools and commands
You do not need to build bags by hand. The Library of Congress maintains open source BagIt libraries, and the Python version includes a command-line tool. Creating a bag in place with SHA-256 checksums looks like this:
bagit.py --sha256 --contact-name "Collections Team" /path/to/collection
Validating it later is a single command:
bagit.py --validate /path/to/collection
A fast validation option checks only the Payload-Oxum, comparing total size and file count. It is useful for a quick look after a transfer, but it is not a fixity check. Run full validation on a schedule. Graphical tools exist for staff who prefer them, and many repository and preservation systems accept bags directly as a deposit format.
Building a routine that lasts
A fixity program fails when it depends on someone remembering to run it. Design the routine so it happens without heroics.
- Checksum at creation. Generate checksums as soon as files are created or received, before anything else touches them. A checksum taken after damage only preserves the damage.
- Bag before every transfer. Package content as a bag before moving it between systems, people or institutions, and validate on arrival.
- Schedule regular checks. Run full validation on stored content on a fixed cycle. Choose the interval based on storage type, volume and risk, and write it down.
- Log every check. Record what was checked, when, with what tool and with what result. PREMIS provides a standard way to describe these as fixity check events.
- Respond to failures. Decide in advance what happens when a check fails: who is alerted, which replica is used for repair, and how the incident is recorded.
- Keep more than one copy. A failed check is only recoverable if a good copy exists somewhere else.
The NDSA Levels of Digital Preservation, maintained by the National Digital Stewardship Alliance, offers a useful way to measure progress. Its fixity guidance moves from simply recording checksums on ingest toward regular checking, logging and repair. A small team can place itself honestly on that scale and pick the next step.

Bags and preservation networks
Fixity at one institution is a good start. Fixity across several independent copies is better. Distributed preservation networks built on LOCKSS take this idea further: nodes compare their copies with each other on an ongoing basis and repair damage automatically. Our explainer on LOCKSS and distributed preservation covers how that works.
BagIt and networks fit together well. Members of a network typically prepare collections locally, package and validate them, then stage them where the network can collect them. The bag gives the member a clear record of what was handed over. The network then keeps that content intact over time. Institutions planning this kind of work can learn a lot from the training approach of the 2007 Distributed Digital Preservation Workshop at Emory, which focused on the organizational and technical context of joining such networks.
The MetaScholar documents archive includes briefings on the reports that led to the MetaArchive network, one of the early cooperatives to put this model into practice for cultural heritage content.
Common mistakes
A few errors appear again and again. Teams bag content after it has already been edited, so the manifest blesses a damaged state. They validate with the fast option and believe they checked fixity. They store the only copy of a manifest beside the only copy of the data. They change files inside data/ without updating the manifest, which breaks validation and erodes trust in every later check. Each of these is avoided by the same habit: treat bags as sealed once created, and make a new bag when content truly changes.
Fixity work is unglamorous. It produces no new collections and few visible results. But it is the difference between believing your files are safe and knowing it. A short command, a scheduled job and a written response plan are enough to start.
