diff options
author | Sergey Poznyakoff <gray@gnu.org> | 2018-12-17 16:05:53 +0200 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org> | 2018-12-17 16:05:53 +0200 |
commit | f6f0330163617f644cd2e6b774e0d9d4b0118b9f (patch) | |
tree | 0b8e239fee48052ae46d1befd2f5c753d63a0724 | |
parent | f0117788b84fc2b941a93de6992658e3706053f3 (diff) | |
download | glacier-f6f0330163617f644cd2e6b774e0d9d4b0118b9f.tar.gz glacier-f6f0330163617f644cd2e6b774e0d9d4b0118b9f.tar.bz2 |
Update docs.
-rw-r--r-- | lib/App/Glacier.pm | 57 | ||||
-rw-r--r-- | lib/App/Glacier/Command/Periodic.pm | 15 | ||||
-rw-r--r-- | lib/App/Glacier/Directory.pm | 2 |
3 files changed, 56 insertions, 18 deletions
diff --git a/lib/App/Glacier.pm b/lib/App/Glacier.pm index fea94d5..2954a23 100644 --- a/lib/App/Glacier.pm +++ b/lib/App/Glacier.pm @@ -189,2 +189,7 @@ Synchronizes the local vault directory with its latest inventory. +=head2 glacier periodic + +Periodic task for glacier job maintenance. It is recommended to run it +each 4 hours as a cronjob. + =head1 OPTIONS @@ -232,6 +237,13 @@ Displays a succint command line usage summary, -Default configuration file is F</etc/glacier.conf>. Its location is -overridden by the value of the command line option B<--config-file> (B<-c>) -and the environment variable B<GLACIER_CONF>. The option takes precedence -over the variable. +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. @@ -267,3 +279,5 @@ security reason. -Sets the Amazon region. +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). @@ -271,6 +285,12 @@ Sets the Amazon region. -The preferred way for storing credentials is in the I<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.: +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.: @@ -281,6 +301,2 @@ Additionally, the default region can be specified after a second semicolon: AEBRGYTEBRET:RTFERYABNERTYR4HDDHEYRTWW:us-west-1 - -The default region is B<eu-west-1>. - -=item Multiple accounts @@ -327,2 +343,17 @@ Sets the number of retries for failed transfers. Defaults to 10. +=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]> diff --git a/lib/App/Glacier/Command/Periodic.pm b/lib/App/Glacier/Command/Periodic.pm index 18bd4f8..51c9718 100644 --- a/lib/App/Glacier/Command/Periodic.pm +++ b/lib/App/Glacier/Command/Periodic.pm @@ -20,5 +20,14 @@ B<glacier periodic> -Scans pending glacier jobs. For each job, checks its current status and if -it the job is completed, retrieves the result. Typical usage is in the -crontab. +Scans glacier jobs, cleaning up expired and failed ones and finishing +up completed ones. For each completed archive retrieval job, the +target file is downloaded and stored in directory configured by +the B<transfer.download.cachedir> configuration setting (default - +F</var/lib/glacier/cache>). This file will be removed when the +corresponding jobs expires. For each completed inventory retrieval job, +the vault inventory is obtained and stored in the database. + +It is recommended to schedule this command for periodic execution in +your crontab, e.g.: + + */4 * * * * root glacier periodic diff --git a/lib/App/Glacier/Directory.pm b/lib/App/Glacier/Directory.pm index 0ab998f..5e3ad46 100644 --- a/lib/App/Glacier/Directory.pm +++ b/lib/App/Glacier/Directory.pm @@ -14,3 +14,2 @@ sub new { my ($class, $backend, $vault, $glacier, %opts) = @_; - my $ttl = delete $opts{ttl}; (my $vault_name = $vault) =~ @@ -25,3 +24,2 @@ sub new { $self->{_glacier} = $glacier; - $self->{_ttl} = $ttl; } |