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, by means of verifying the bags.
Fixity can also be configured to POST its 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/fixity
- Go to /usr/lib/archivematica/
user@root:~$ cd /usr/lib/archivematica/
- Clone the code:
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
Once this is complete, the directory /usr/lib/archivematica/fixity should exist. cd back to the home directory
- Create a virtualenv in /usr/share/python/fixity, and install fixity and dependencies in it
- Switch to root
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 root.
(fixity)root@host:/usr/lib/archivematica/fixity# ln -s /usr/share/python/fixity/bin/fixity /usr/local/bin/fixity
- Export required environment variables. For ease of use later, creating /etc/profile.d/fixity.sh is recommended:
- To create the file:
(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 Storage Service user. 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:
export REPORT_URL=http://myurl.com export REPORT_USERNAME=myuser export REPORT_PASSWORD=mypassword
- Load the variables from the file.
(fixity)root@host:/usr/lib/archivematica/fixity# source /etc/profile.d/fixity.sh
- Run the tool with sudo or as root the first time. Subsequent runs can be with any user.
(fixity)root@host:/usr/lib/archivematica/fixity# fixity scanall
- To exit the virtualenv:
(fixity)root@host:/usr/lib/archivematica/fixity# deactivate root@host:/usr/lib/archivematica/fixity#
And to exit the root user:
root@host:/usr/lib/archivematica/fixity# exit user@host:~$
- After the initial install, to run fixity you only need to load the variables you defined earlier and run fixity.
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.
To check fixity of all AIPs in storage run
To check fixity of a specific AIP use the AIPs UUID and run
fixity scan 229adfe9-c63b-4ebc-9428-0b9427b5862c
replacing the above UUID with your AIP’s UUID.
The following flags can be used with the commands above:
--throttle to 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-local forces the use of the Storage Service for the fixity check, rather than using the space’s internal fixity method.
debug will 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.