App-Glacier

 view release on metacpan or  search on metacpan

lib/App/Glacier.pm  view on Meta::CPAN

Sets account ID to use.  See B<Multiple accounts>, below. 
    
=item B<-f>, B<--config-file=>I<FILE>

Sets the name of the configuration file to use.  In the absense of this
option, the environment variable B<GLACIER_CONF> is consulted.  If it
is not set, the default file F</etc/glacier.conf> is read.  See
the section B<CONFIGURATION> for its description.    
    
=item B<-d>, B<--debug>

Increases debug output verbosity level.    
    
=item B<-n>, B<--dry-run>

Dry run mode: do nothing, print everything.
    
=item B<--help>

Display the detailed help page.
    
=item B<--region=>I<STRING>

Sets the avaialbility region.    
    
=item B<--usage>

Displays a succint command line usage summary,    

=back    
    
=head1 CONFIGURATION

Default configuration file is F</etc/glacier.conf>. This file is optional.
If it does not exist, B<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
L<https://docs.aws.amazon.com/amazonglacier/latest/dev/access-control-identity-based.html> for details on identity-based policies.

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

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

The following sections are recognized:

=over 4

=item B<[glacier]>

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

=item B<credentials => I<FILE>

Sets the name of the credentials file.  See below for a detailed discussion.
    
=item B<access => I<KEYNAME>

Defines Amazon access key or access ID for look up in the credentials file.
    
=item B<secret => I<SECRET>

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

=item B<region => I<NAME>

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

If either of B<access> or B<secret> is not supplied, B<glacier> attemtps to
obtain access and secret keys from the file named in the B<credentials>
setting (if it is defined). If unable to find credentials, B<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.:

    AEBRGYTEBRET:RTFERYABNERTYR4HDDHEYRTWW

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

    AEBRGYTEBRET:RTFERYABNERTYR4HDDHEYRTWW:us-west-1
    
If you have several accounts, you can list their credentials on separate lines.
In that case, B<glacier> will select the account with the access key supplied
by the B<access> configuration statement, or the B<--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 B<#:I<NAME>> immediately preceding it.  In that case, the I<NAME>
can be used to select it using the B<--account> option or B<access> configuration statement.

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

=item B<[transfer]>

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

=item B<single-part-size => I<SIZE>

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

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

=item B<retries => I<NUMBER>

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

=back

=item B<[transfer download]>

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

=over 8

=item B<cachedir => I<DIR>

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

=item B<[database job]>

Configures the I<job database>.  Job database is a local GDBM file, which
B<glacier> uses to keep track of the initiated Amazon Glacier jobs.
    
=over 8

=item B<file => I<NAME>

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

=item B<mode => I<OCTAL>

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



( run in 1.518 second using v1.01-cache-2.11-cpan-cdf2f3d4e48 )