App-MtAws

 view release on metacpan or  search on metacpan

README.md  view on Meta::CPAN

		echo "deb http://dl.mt-aws.com/debian/current squeeze main"|sudo tee /etc/apt/sources.list.d/mt-aws.list


3.	`sudo apt-get update`
4.	`sudo apt-get install libapp-mtaws-perl`


	(To use HTTPS you also need:)

5. `sudo apt-get install build-essential libssl-dev`

6. install/update `LWP::UserAgent` and `LWP::Protocol::https` using [cpanm]

##### Debian 7 (Wheezy), including rasbian for Raspberry Pi

Can be installed/updated via custom repository

1.	`wget -O - https://mt-aws.com/vsespb.gpg.key | sudo apt-key add -`

	(this will add GPG key 2C00 B003 A56C 5F2A 75C4 4BF8 2A6E 0307 **D0FF 5699**)

2. Add repository


		echo "deb http://dl.mt-aws.com/debian/current wheezy main"|sudo tee /etc/apt/sources.list.d/mt-aws.list


3.	`sudo apt-get update`
4.	`sudo apt-get install libapp-mtaws-perl`

##### Debian 8 (Jessie)

Can be installed/updated via custom repository

1.	`wget -O - https://mt-aws.com/vsespb.gpg.key | sudo apt-key add -`

	(this will add GPG key 2C00 B003 A56C 5F2A 75C4 4BF8 2A6E 0307 **D0FF 5699**)

2. Add repository


		echo "deb http://dl.mt-aws.com/debian/current jessie main"|sudo tee /etc/apt/sources.list.d/mt-aws.list


3.	`sudo apt-get update`
4.	`sudo apt-get install libapp-mtaws-perl`

### Manual installation

#### Install prerequisites

###### Ubuntu 12.04+, Debian 7

`sudo apt-get install libwww-perl libjson-xs-perl`

###### RHEL/CentOS 5

1. `sudo yum install perl-Digest-SHA`
2. `sudo yum groupinstall "Development Tools"`
3. `sudo yum install openssl-devel`
4. Install `JSON::XS`, `LWP::UserAgent` and `LWP::Protocol::https` using [cpanm]

You also can install `mtglacier` prerequisites without CPAN if you have [EPEL](http://fedoraproject.org/wiki/EPEL) repository enabled and if you don't need HTTPS:

`sudo yum install perl-Digest-SHA perl-JSON-XS perl-libwww-perl`

###### RHEL/CentOS 6

1. `sudo yum install perl-core perl-CGI`
2. `sudo yum groupinstall "Development Tools"`
3. `sudo yum install openssl-devel`
4. Install `JSON::XS`, `LWP::UserAgent` and `LWP::Protocol::https` using [cpanm]

You also can install `mtglacier` prerequisites without CPAN if you have [EPEL](http://fedoraproject.org/wiki/EPEL) repository enabled and if you don't need HTTPS:

`sudo yum install perl-core perl-CGI perl-JSON-XS perl-libwww-perl`

###### Debian 6

`sudo apt-get install libwww-perl libjson-xs-perl`

To use HTTPS you also need:

1. `sudo apt-get install build-essential libssl-dev`

3. install/update `LWP::UserAgent` and `LWP::Protocol::https` using [cpanm]

###### Fedora 18+

`sudo yum install perl-core perl-CGI perl-JSON-XS perl-libwww-perl perl-LWP-Protocol-https`

###### SUSE Linux Enterprise Server 11

1. `sudo zypper install perl-libwww-perl libopenssl-devel`
2. `sudo zypper install --type pattern Basis-Devel`
3. Upgrade openssl to (at least) `0.9.8r` (to check version use `openssl version`), can be found [here](http://download.opensuse.org/repositories/security:/fips/) (more info here [RT#81575](https://rt.cpan.org/Public/Bug/Display.html?id=81575))
4. Update `ExtUtils::MakeMaker` via [cpanm]
5. Install `LWP::UserAgent`, `LWP::Protocol::https`, `JSON::XS` using [cpanm]

###### Amazon Linux 2013.03

`sudo yum install perl-core perl-JSON-XS perl-libwww-perl perl-LWP-Protocol-https`

###### MacOS X

Install the following packages:

Install `LWP::UserAgent` (`p5-libwww-perl`), `JSON::XS` (`p5-json-XS`). For HTTPS support you need `LWP::Protocol::https`, however on MacOS X
you probably need `Mozilla::CA` (it should go with `LWP::Protocol::https`, but it can be missing). Try to use HTTPS without `Mozilla::CA` - if it does not work, install
`Mozilla::CA`

#### Install mt-aws-glacier

	git clone https://github.com/vsespb/mt-aws-glacier.git

(or just download and unzip `https://github.com/vsespb/mt-aws-glacier/archive/master.zip` )

After that you can execute `mtglacier` script (found in root of repository) from any directory, or create a symlink to it - it will find other package files by itself
(don't forget to remove it later, if you decide to switch to CPAN install)

### *OR* Installation via CPAN

		cpan -i App::MtAws

That's it.


### Installation general instructions, troubleshooting, edge cases and misc instructions

##### In general you need the following perl modules to run *mt-aws-glacier*:

* **LWP::UserAgent** (or Debian package **libwww-perl** or RPM package **perl-libwww-perl** or MacPort **p5-libwww-perl**)
* **JSON::XS** (or Debian package **libjson-xs-perl** or RPM package **perl-JSON-XS** or MacPort **p5-json-XS**)

##### Other notes

1. for old Perl < 5.9.3 (i.e. *CentOS 5.x*), install also **Digest::SHA** (or Debian package **libdigest-sha-perl** or RPM package **perl-Digest-SHA**)

2. Some distributions with old Perl stuff (examples: *Ubuntu 10.04*, *CentOS 5/6*) to use HTTPS you need to upgrade **LWP::Protocol::https** to version 6+ via CPAN.

3. *Fedora*, *CentOS 6* etc [decoupled](http://www.nntp.perl.org/group/perl.perl5.porters/2009/08/msg149747.html) Perl,
so package named `perl`, which is a part of default installation, is not actually real, full Perl, which is misleading.
`perl-core` is looks much more like a real Perl (I [hope](https://bugzilla.redhat.com/show_bug.cgi?id=985791) so)

4. On newer RHEL distributions (some *Fedora* versions) you need install **perl-LWP-Protocol-https** to use HTTPS.

5. To inistall `perl-JSON-XS` RPM package on RHEL5/6 you need to enable [EPEL](http://fedoraproject.org/wiki/EPEL) repository

6. If you've used manual installation before "CPAN" installation, it's probably better to remove previously installed `mtglacier` executable from your path.

7. CPAN distribution of *mt-aws-glacier* has a bit more dependencies than manual installation, as it requires additional modules for testsuite.

8. New releases of *mt-aws-glacier* usually appear on CPAN within a ~week after official release.

9. On *Fedora*, *CentOS 6 minimal* you need to install `perl-core`, `perl-CPAN`, `perl-CGI` before trying to install via CPAN

10. For some distributions with old Perl stuff (examples: *CentOS 5/6*) you need to update CPAN and Module::Build first: `cpan -i CPAN`, `cpan -i Module::Build`

11. CPAN tool asks too many questions during install (but ignores important errors). You can avoid it by running `cpan` command and configuring it like this:

		o conf build_requires_install_policy yes
		o conf prerequisites_policy follow
		o conf halt_on_failure on
		o conf commit
		exit

12. Instead system `cpan` tool you might want to try [`cpanm`](http://search.cpan.org/perldoc?App%3A%3Acpanminus) - it's a bit easier to install and configure.

13. Installation of **LWP::Protocol::https** requires C header files ( `yum groupinstall "Development Tools"` for RHEL or `build-essential` for Debian ) and OpenSSL dev library (`openssl-devel` RPM or `libssl-dev` DEB).

[cpanm]:http://search.cpan.org/perldoc?App%3A%3Acpanminus

## Warnings ( *MUST READ* )

* When playing with Glacier make sure you will be able to delete all your archives, it's impossible to delete archive
or non-empty vault in amazon console now. Also make sure you have read _all_ Amazon Glacier pricing/faq.

* Read Amazon Glacier pricing [FAQ][Amazon Glacier faq] again, really. Beware of retrieval fee.

* Before using this program, you should read Amazon Glacier documentation and understand, in general, Amazon Glacier workflows and entities. This documentation
does not define any new layer of abstraction over Amazon Glacier entities.

* In general, all Amazon Glacier clients store metadata (filenames, file metadata) in own formats, incompatible with each other. To restore backup made with `mt-aws-glacier` you'll
need `mt-aws-glacier`, other software most likely will restore your data but loose filenames.

* With low "partsize" option you pay a bit more (Amazon charges for each upload request)

* For backup created with older versions (0.7x) of mt-aws-glacier, Journal file **required to restore backup**.

* Use a **Journal file** only with **same vault** ( more info [here](#what-is-journal) and [here](#how-to-maintain-a-relation-between-my-journal-files-and-my-vaults) and [here](https://github.com/vsespb/mt-aws-glacier/issues/50))

* When work with CD-ROM/CIFS/other non-Unix/non-POSIX filesystems, you might need set `leaf-optimization` to `0`



( run in 0.560 second using v1.01-cache-2.11-cpan-39bf76dae61 )