App::Glacier - command line utility for accessing Amazon Glacier storage


glacier [-?dn] [-f FILE] [--account=STRING] [--config-file=FILE] [--debug] [--dry-run] [--help] [--region=STRING] [--usage] COMMAND [OPTIONS] ARG...


Command line tool for working with the Amazon Glacier storage. The COMMAND instructs it what kind of manipulation is required. Its action can be modified by OPTIONS supplied after the command name. Options occurring before it affect the behavior of the program as a whole and are common for all commands.

The following is a short summary of existing commands. For a detailed description about any particular command, please refer to the corresponding manual page (glacier-command), or run glacier command --help.

On file versioning

In the discussion below, FILE stands for the name of the file to which the command in question applies. In contrast to the UNIX filesystem, where each file name is unique within the directory, Glacier vaults can keep multiple copies of the same file. To discern between them, the version number is used. When a file FILE is first stored in a vault, it is assigned version number 1. The version numbed of this copy is incremented each time a new copy of the same file is added to the vault. The most recently stored copy always has the version number of 1.

Each command by default operates on the most recent copy of the file, i.e. the one with the version number 1. To address a particular version of the file, append the version number to its name with a semicolon in between. For example, to list FILE, version 3, do:

    glacier ls vault 'FILE;3'

Notice the use of quotes to prevent ; from being interpreted by the shell.



Download FILE from the VAULT. The LOCALNAME argument, if present, gives the name of the local file.

glacier jobs [VAULT...]

List Glacier jobs.

glacier ls [VAULT] [FILES...]

Without arguments, lists all existing vaults. With one argument, lists files in the specified vault. If additional arguments are given, only files with matching names will be listed.

glacier mkvault NAME

Creates a vault with given NAME.

glacier purge VAULT

Removes all archives from the vault.


Uploads FILE to VAULT. The REMOTENAME, if supplied, gives the new name for the uploaded copy of file. If absent, the base name of FILE is used.

glacier rm VAULT FILE...

Removes files from the vault.

glacier rmvault NAME

Removes the vault. It must be empty for the command to succeed.

glacier sync VAULT

Synchronizes the local vault directory with its latest inventory.

glacier periodic

Periodic task for glacier job maintenance. It is recommended to run it each 4 hours as a cronjob.



Displays short option summary.


Sets account ID to use. See Multiple accounts, below.

-f, --config-file=FILE

Sets the name of the configuration file to use. In the absense of this option, the environment variable GLACIER_CONF is consulted. If it is not set, the default file /etc/glacier.conf is read. See the section CONFIGURATION for its description.

-d, --debug

Increases debug output verbosity level.

-n, --dry-run

Dry run mode: do nothing, print everything.


Display the detailed help page.


Sets the avaialbility region.


Displays a succint command line usage summary,


Default configuration file is /etc/glacier.conf. This file is optional. If it does not exist, glacier will attempt to start up with default values (optionally modified by the command line options). If you run glacier on a EC2 instance with an associated IAM profile, you can omit the configuration file, provided that the profile gives the necessary permissions on the Glacier storage. Please see for details on identity-based policies.

Th configuration file can also be specified using the environment variable GLACIER_CONF, or from the command line, using the --config-file (-c) option. If both are used, the option takes precedence over the variable.

Configuration file consists of statements in the form variable = value), grouped into sections. Whitespace is ignored, except that it serves to separate input tokens. However, value is read verbatim, including eventual whitespace characters that can appear within it.

The following sections are recognized:


Configures access to the Glacier service. The following keywords are defined:

credentials = FILE

Sets the name of the credentials file. See below for a detailed discussion.

access = KEYNAME

Defines Amazon access key or access ID for look up in the credentials file.

secret = SECRET

Sets the secret key. The use of this statement is discouraged for security reason.

region = NAME

Sets the Amazon region. If this setting is absent, glacier will attempt to retrieve the region from the instance store (assuming it is run on an EC2 AWS instance).

If either of access or secret is not supplied, glacier attemtps to obtain access and secret keys from the file named in the credentials setting (if it is defined). If unable to find credentials, glacier attempts to get credentials from the instance store, assuming it is run on an EC2 instance. It will exit if this attempt fails.

The credentials file allows you to store all security sensitive data in a single place and to tighten permissions accordingly. In the simplest case, this file contains a single line with your access and secret keys separated by a semicolon, e.g.:


Additionally, the default region can be specified after a second semicolon:


If you have several accounts, you can list their credentials on separate lines. In that case, glacier will select the account with the access key supplied by the access configuration statement, or the --account command line option. If neither of these are supplied, the first account in the file will be used.

To further facilitate selection of the credential pair, each line can be tagged with the line #:NAME immediately preceding it. In that case, the NAME can be used to select it using the --account option or access configuration statement.

Apart from these constructs, the credentials file can contain empty lines and comments (lines beginning with # followed by any character, except : ), which are ignored.


Configures transfer values. The section name can be optionally followed by upload or download to indicate that it applies only to transfers in that particular direction.

single-part-size = SIZE

Defines the maximum size for single-part transfers. Archives larger than SIZE will be transferred using multiple-part procedure. SIZE must be a number, optionally followed by one of the following suffixes: K, for kilobytes, M, for megabytes, or G for gigabytes. Suffixes are case-insensitive. The default is 100M.

jobs = NUMBER

Sets the number of transfers running in parallel, if multi-part transfer is selected. The default value is 16.

retries = NUMBER

Sets the number of retries for failed transfers. Defaults to 10.

[transfer download]

In addition to settings discussed above, the transfer download section can contain the following:

cachedir = DIR

Names the directory used to keep files downloaded after successful completion of archive retrieval jobs. This directory is managed by glacier periodic subcommand. The default value is /var/lib/glacier/cache.

[database job]

Configures the job database. Job database is a local GDBM file, which glacier uses to keep track of the initiated Amazon Glacier jobs.

file = NAME

Defines the database file name. The default is /var/lib/glacier/job.db.

mode = OCTAL

Defines the file permissions. It is used if the database does not exist and glacier has to create it. The default value is 644.

ttl = NUMBER

Interval in seconds after which the completed job will be checked to ensure it has not expired. Default is 72000 seconds (20 hours).

[database inv]

Configures inventory databases. Inventory databases associate file names with the corresponding Glacier archives and keep additional bookkeeping information.

directory = DIR

Directory where to place the databases. The default is /var/lib/glacier/inv.

mode = OCTAL

File mode for creating missing databases. The default value is 644.

ttl = NUMBER

Interval in seconds after which the completed inventory will be checked to ensure it has not expired. Default is 72000 seconds (20 hours).



Default configuration file.


Default job database name,


Inventory database for the VAULT.


glacier-get(1), glacier-jobs(1), glacier-ls(1), glacier-mkvault(1), glacier-purge(1), glacier-put(1), glacier-rm(1), glacier-rmvault(1), glacier-sync.


GPLv3+: GNU GPL version 3 or later, see <>

This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.


Sergey Poznyakoff <>