Fixity is an application for use with an Archivematica Storage Service installation. Fixity is run from the command-line and will check the checksums of AIPs in storage as a means of verifying the integrity of the bags.
Fixity can also be configured to POST reports to a remote service after completing every scan. It also retains an internal database which keeps track of every AIP it has scanned and a report of every scan. The Archivematica Storage Service displays these reports in the Packages tab; see reporting, below.
On this page
Checkout or link the code to
/usr/lib/archivematica/fixityby navigating to
/usr/lib/archivematica/`and cloning the code. Once this is complete, the directory
user@root:~$ cd /usr/lib/archivematica/ user@root:/usr/lib/archivematica/$ git clone https://github.com/artefactual/fixity.git
If you get a permissions error, try running the command as sudo:
sudo git clone https://github.com/artefactual/fixity.git
Navigate to the home directory and switch to root. Then create a virtualenv in
/usr/share/python/fixityand install Fixity and dependencies in it.
user@root:/usr/lib/archivematica/$ cd ~ user@root:~$ sudo -i root@host:~# virtualenv /usr/share/python/fixity root@host:~# source /usr/share/python/fixity/bin/activate (fixity)root@host:~# cd /usr/lib/archivematica/fixity (fixity)root@host:/usr/lib/archivematica/fixity# pip install -r requirements.txt (fixity)root@host:/usr/lib/archivematica/fixity# python setup.py install
Create a symlink from the executable to /usr/local/bin. You must still be logged in as root.
(fixity)root@host:/usr/lib/archivematica/fixity# ln -s /usr/share/python/fixity/bin/fixity /usr/local/bin/fixity
Export the required environment variables. For ease of use later, creating /etc/profile.d/fixity.sh is recommended. To create the file, run the following commands:
(fixity)root@host:/usr/lib/archivematica/fixity# touch /etc/profile.d/fixity.sh (fixity)root@host:/usr/lib/archivematica/fixity# nano /etc/profile.d/fixity.sh
You are now editing the environment variables file. You should use the URL of your Storage Service, and the username and API key of one of your Storage Service users. Replace the URL, user and key with your data.
#!/bin/bash export STORAGE_SERVICE_URL=http://localhost:8000 export STORAGE_SERVICE_USER=myuser export STORAGE_SERVICE_KEY=myapikey
Optionally, if you are using Fixity with a reporting service, you can also add the following:
export REPORT_URL=http://myurl.com export REPORT_USERNAME=myuser export REPORT_PASSWORD=mypassword
Finally, load the variables from the file.
(fixity)root@host:/usr/lib/archivematica/fixity# source /etc/profile.d/fixity.sh
Run Fixity with sudo or as root the first time. Subsequent runs can be with any user.
(fixity)root@host:/usr/lib/archivematica/fixity# fixity scanall
Exit the virtualenv and root user.
(fixity)root@host:/usr/lib/archivematica/fixity# deactivate root@host:/usr/lib/archivematica/fixity# root@host:/usr/lib/archivematica/fixity# exit user@host:~$
The first time you run Fixity after the initial install, load the variables you defined above and set Fixity to scan all AIPs.
user@host:~$ source /etc/profile.d/fixity.sh user@host:~$ fixity scanall
Fixity is run from the command line after installation as per the instructions above.
Check fixity of all AIPs in storage
Run the following command:
Check fixity of a specific AIP
Find the UUID of the AIP. This can be done by going to the Archival Storage tab of the pipeline or finding the AIP in the Storage Service’s Packages tab. Once you have the UUID, run the following command, replacing the sample UUID here with your AIP’s UUID:
fixity scan 229adfe9-c63b-4ebc-9428-0b9427b5862c
The following flags can be used with the commands above:
--throttle: add time (in seconds) to wait when scanning multiple AIPs. This can help reduce extended disk load on the filesystem on which the AIPs reside.
--force-local: some types of Storage Service spaces (e.g. Arkivum) have a space-specific way of performing fixity checks. Using
force-localforces the use of the Storage Service for the fixity check, rather than using the space’s internal fixity method.
debug: add extra debugging output.
Fixity checks will be reported in the Packages tab, in the Fixity Date and Fixity Status columns:
Click on the Fixity status for an AIP (either “Failed” or “Success”) to see the history of fixity checks. The history page will show the time and date of the fixity checks and the error, if any.