- SEE ALSO
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.
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.
List Glacier jobs.
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.
Creates a vault with given NAME.
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.
Removes files from the vault.
Removes the vault. It must be empty for the command to succeed.
Synchronizes the local vault directory with its latest inventory.
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. Its location is overridden by the value of the command line option --config-file (-c) and the environment variable GLACIER_CONF. 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.
The preferred way for storing credentials is in the credentials file. This 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:
The default region is eu-west-1.
- Multiple accounts
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.
- [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 <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.
Sergey Poznyakoff <email@example.com>