Partner Tools

From aptrust
Jump to: navigation, search

APTrust Partner Tools can help you validate bags and manage your AWS buckets. Use the links below download the tools.

Version 2.2-beta

This version fixes some minor bugs and standardizes exit codes across all of the tools. It also replaces the underlying S3 library used for uploads and downloads with the official Amazon S3 library. The apt_upload program includes some breaking changes from the last release. Read the README.txt file included in the package.

OSX (64-bit) (v 2.2-beta - 12/04/2017)

Linux (64-bit) (v 2.2-beta - 12/04/2017)

Windows (64-bit) (v 2.2-beta - 12/04/2017)

Issue and Workaround with MacOS Mojave:
Mac OS may not be able to find libmagic libraries since they may not be installed globally and throw following error:
gordonl ~/Downloads/APTrustTools $\0$ apt_check_ingest --help
dyld: Library not loaded: /usr/local/lib/libmagic.1.dylib
  Referenced from: /Users/gordonl/n/APTrust_2019_Jan/Tools/APTrust_Partner_Tools_Mac_2.2-beta/apt_check_ingest
  Reason: image not found
Abort trap: 6
$ brew install libmagic
$ sudo ln -s /usr/local/brew/lib/libmagic* /usr/local/lib

Version 2.1

The version 2.1 tools are identical to the version 1.03 tools, except for the following additions:

  • apt_check_ingest, which can tell you the ingest status of a bag from the command line. (Added Nov. 17, 2017)
    • 2017-11-28: Added -etag option, added etag to text output, and improved readability of text output.
  • apt_validate, which can now validate both APTrust and DPN bags. (Added Feb. 17, 2017)
    • 2017-11-28: Fixed EXCHANGE_HOME/GOPATH error message that prevented the tool from running.
    • 2017-11-28: Fixed validation of untarred path on Windows.

The 2.1 packages include json configuration files that tell the validator how to validate APTrust and DPN bags.

You won't need to create or validate DPN bags. APTrust does that for you when you push items through us to DPN. The DPN validation config is included as an example of how to write a configuration file to validate bags whose requirements differ from the standard APTrust requirements. Although the configuration does not cover every possible BagIt option, it is a solid first step toward a fast, stand-alone, configurable bag validation tool. It runs on Mac, Linux, and Windows, has no installation dependencies, and is known to have good performance on large bags.

For help with the new validator, simply run the apt_validate command with no options or parameters.

OSX (64-bit) (v 2.1 - 11/28/2017)

Linux (64-bit) (v 2.1 - 11/28/2017)

Windows (64-bit) (v 2.1 -11/28/2017)

Version 1.03

OSX (64-bit) (v 1.03 - 12/14/2015)

Linux (64-bit) (v 1.03 - 12/14/2015)

Windows (64-bit) (v 1.03 - 12/14/2015)

Each archive contains the five executable files listed below. There is no installer. Simply put the executables where you want them and run them from the command line.

Tool Description
apt_check_ingest Command-line tool to check the ingest status of a bag.
apt_validate Validate bags (tarred or untarred) before uploading them for ingest (Version 1.03 has a bug that marks some bags with invalid tag manifests as valid. This validator also does not identify some invalid file names. Version 2.0 fixes these bugs.)
apt_upload Upload bags to your receiving buckets for ingest
apt_list List the contents of your receiving and restoration buckets
apt_download Download restored bags from your restoration buckets
apt_delete Delete restored bags from your restoration buckets


All of the tools except apt_validate require a simple config file with five name-value pairs. The config file format and requirements are the same for 1.03 and 2.0 tools. Note that quotes are optional, and comment lines begin with a hash mark.

# Config for apt_upload and apt_download
AwsAccessKeyId = 123456789XYZ
ReceivingBucket = ''
RestorationBucket = ""
DownloadDir = "/home/josie/downloads"
AptrustApiUser = ""
AptrustApiKey = "f887afc5e1624eda92ae1a5aecdf210c"

If you prefer not to put your AWS keys in the config file, you can put them into environment variables called AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY.

ReceivingBucket: S3 bucket that will hold your uploaded APTrust bags that are awaiting ingest.

RestorationBucket: S3 bucket that will hold your restored APTrust bags.

DownloadDir: The local directory in which to save files downloaded from your APTrust restoration bucket. The APTrust config currently does not expand ~ to your home directory, so use an absolute path to be safe.

AptrustApiUser: The email address for logging in to APTrust's PharosPharos is APTrusts web interface to manage deposits and inspect deposit outcomesETag The entity tag is a hash of the object. The ETag reflects changes only to the contents of an object, not its metadata. REST APIApplication Programming Interface.

AptrustApiKey: Your API keyAPI key is a code passed in by computer programs calling an application programming interface (API) to identify the calling program for the PharosPharos is APTrusts web interface to manage deposits and inspect deposit outcomesETag The entity tag is a hash of the object. The ETag reflects changes only to the contents of an object, not its metadata. REST APIApplication Programming Interface. This key must match the user email. (That is, cannot log in with a key that was issued to

If you save your config file as ~/.aptrust_partner.conf in Linux/Mac or as %HOMEPATH%\.aptrust_partner.conf under Windows, you will not have to specify a --config option when you run the tools. Otherwise, run the tools with the --config file pointing to the full path of your configuration file.

DART Prototype

DART (Digital Asset Routing Tool) Prototype is an early version of our GUI tool for Windows and Mac. It allows for drag'n'drop bagging and ingest of items into the APTrust repository. Keep in mind that this is an early prototype and not free of bugs but the core functionality works.

Documentation on how to get started with DART can be found here:

Windows Version 0.1,9

Linux Version 0.1.9


You can view any program's built-in documentation by passing the --help flag.

If you run into problems, send a message to help [at]