How to Install and Use Amazon Glacier on Linux

The storage platforms these days are numerous, so any user can find what suits his needs and preferences at most. Though, the cloud services are today the top services, when it comes to storing large files, images and even entire pack of systems. The only limitation a customer might suffer, while choosing a storage cloud system, is the operative system he or she has installed on his device – either a mobile, or a general desktop one. Thankfully, most of the storage cloud platforms these days are oriented to all kinds of clients and consumers – regardless the OS they use. And if a cloud service has no access for a particular OS, the last few years have changed that by putting the big IT leaders create a faultless and smooth adjustment of each cloud storage platform to each operative system. The same thing, as a matter of fact, has happened to the Glacier cloud platform for file storing, because recently it has acquired a brand new version for Linux system. See more about it now.

The Glacier platform is a well-known budget-friendly could storage service that is generously established and provided by Amazon Web Services. Many experts recommend users to consider whether to use this particular program very precisely, because, as a matter of fact, it has several time limitations in case of data retrieving. Still, the Glacier storage, in general, is recognized as a customer-friendly, very helpful, intuitive and beneficial program, if you need some cloud storage free space. Moreover – the platform is highly appreciated by those users, who need digital archiving, as well as different backup services with the necessity not to retrieve the archived data instantly.

Great news for all the Linux system clients! The Glacier Amazon Cloud Storage alternative is now available for them, too! And for this purpose we have decided to present you a very easy and step by step guide that will help you how to install and use the Amazon Glacier on Linux OS. So, if you are ready and you like the Glacier, let’s begin!

Before we begin, we need to add that in order to use the Glacier on Linux system, you will have to sign up for AWS, which requires from you a possession of valid registration, official access and of course – availability of secret key.

How to install Amazon Glacier on Debian / Ubuntu

As a beginning, we need to start with the installation of the Amazon Glacier command interface on your Linux System. What you have to do at first is to install each of the prerequisites. First you need to install python, git and python-setuptools packages via apt-get. Then you need to clone amazon glacier from GitHub and finally you need to install it. Here is the GitHub project of Amazon Glacier Command Line Interface. Here are the commands needed for setup. Note that first and last command needs to be run as sudo.

howopensource@esprimo:~$ sudo apt-get install git python-setuptools python
howopensource@esprimo:~$ git clone git://github.com/uskudnik/amazon-glacier-cmd-interface.git
howopensource@esprimo:~$ cd amazon-glacier-cmd-interface/
howopensource@esprimo:~$ sudo python setup.py install

Install Amazon Glacier Linux - Ubuntu, Debian

Install Amazon Glacier on RedHat / CentOS / Fedora

Steps for yum based distributions are similar. Just follow the commands.

# yum install git wget
# wget https://pypi.python.org/packages/source/s/setuptools/setuptools-7.0.tar.gz --no-check-certificate
# tar xzf setuptools-7.0.tar.gz
# cd setuptools-7.0
# python setup.py install
# git clone git://github.com/uskudnik/amazon-glacier-cmd-interface.git
# cd amazon-glacier-cmd-interface/
# sudo python setup.py install

How to configure the Amazon Glacier on Linux

When it comes to the configuration of your Amazon Glacier command interface, there are several opportunities you have. According to your own needs, you can actually simply and quickly configure the platform for your Linux System. By using the configuration file, you will replace with your both – the secret key and the AWS data access. Note that the following example uses invalid secret key and AWS access, so you cannot copy it directly in order to configure the Glacier for Linux. Replace it with your own access key and secret key.

howopensource@esprimo:~$ gedit ~/.glacier-cmd
howopensource@esprimo:~$ more ~/.glacier-cmd
[aws]
aws-access-key=AOKBJ7MKPWEIHPVS8IDA
aws-secret-key=Ae7L3LPj2/fGE/lr2+2K+JE2KlwASoder73Wu+Po

[glacier]
region=ap-southeast-2
logfile=~/.glacier-cmd.log
loglevel=INFO
output=print

Amazon Glacier Config File Linux

Common usage tips for Glacier commands

The very first thing you need to do is to establish your storage box in Glacier or in short – the vault. Here is the list of the vaults that are available for the customers of Linux OS. You need to upload now this file to your vault.

How to create vault:

howopensource@esprimo:~$ glacier-cmd mkvault howopensource
+-----------+-------------------------------------------------+
|   Header  |                      Value                      |
+-----------+-------------------------------------------------+
| RequestId | w4H3sCasf45y5Lf0K5o7YtaOdQbOkhUHQcmjU21d9ZumjUl |
|  Location |       /827356342345/vaults/howopensource        |
+-----------+-------------------------------------------------+

How to list avaiable vaults:

howopensource@esprimo:~$ glacier-cmd lsvault
+------+------------------------------------------------------------------+--------------------------+---------------+
| Size |                               ARN                                |         Created          |  Vault name   |
+------+------------------------------------------------------------------+--------------------------+---------------+
|  0   | arn:aws:glacier:ap-southeast-2:827356342345:vaults/howopensource | 2015-02-08T15:23:12.032Z | howopensource |
+------+------------------------------------------------------------------+--------------------------+---------------+

Upload file to a vault:

howopensource@esprimo:~$ glacier-cmd upload howopensource howopensource_backup.tar.gz --description "HowOpenSource backup"
Wrote 10.8 MB. Rate 128.40 KB/s. Rate 89.57 KB/s, average 105.61 KB/s, ETA 05:35:14.
+--------------------------+------------------------------------------------------------------+
|          Header          |                              Value                               |
+--------------------------+------------------------------------------------------------------+
| Archive SHA256 tree hash | ef423434616343df8fg57d078dgf3dg744de24e1a27j3y737624e09455568c57 |
|      Uploaded file       |                   howopensource_backup.tar.gz                    |
+--------------------------+------------------------------------------------------------------+

More Glacier commands usage tips

Keep in mind that the following operations might require a period of time – usually 24 hours – to be updated by the Amazon Services for your personal inventory. Due to this different commands – like the inventory list retrieval, for example – might be updated, which will eventually might not come with the recent uploads you have made.

List all archives within howopensource inventory:

howopensource@esprimo:~$ glacier-cmd inventory howopensource

Download Glacier archive:
The downloading process of the Glacier archive comes with two processing steps. Thus, at first, you will have to make a download request with your personal IP from the inventory.

howopensource@esprimo:~$ glacier-cmd getarchive howopensource adyklr2vu

Keep in mind that Amazon services will ask for few hours to process your request and when this happens, you can finally download the archive.

howopensource@esprimo:~$ glacier-cmd download howopensource adyklr2vu

How to remove the Glacier archive:

howopensource@esprimo:~$ glacier-cmd rmarchive howopensource adyklr2vu

How to obtain more details about the vault in Glacier:

howopensource@esprimo:~$ glacier-cmd describevault howopensource

How to remove the Glacier vault:
Bear in mind that you can remove only an empty vault. If you need to remove glacier vault you first have to remove all archives from the vault. Once it is empty, proceed like that.

howopensource@esprimo:~$ glacier-cmd rmvault howopensource

How to list the active Glacier jobs:

howopensource@esprimo:~$ glacier-cmd listjobs howopensource

For more info and help you can list all available commands with –help option:

howopensource@esprimo:~$ glacier-cmd --help
Command line interface for Amazon Glacier
Subcommands:
                        For subcommand help, use: glacier-cmd  -h
    mkvault             Create a new vault.
    lsvault             List available vaults.
    describevault       Describe a vault.
    rmvault             Remove a vault.
    upload              Upload an archive to Amazon Glacier.
    listmultiparts      List all active multipart uploads.
    abortmultipart      Abort a multipart upload.
    inventory           List inventory of a vault, if available.
    getarchive          Requests to make an archive available for download.
    download            Download a file by archive id.
    rmarchive           Remove archive from Amazon Glacier.
    search              Search Amazon SimpleDB database for available archives
    listjobs            List active jobs in a vault.
    describejob         Describe a job.
    treehash            Calculate the tree-hash (Amazon style sha256-hash) of a file.
    sns                 Subcommands related to SNS

Amazon Glacier Help Command Debian

Hope this article gives you an basic overview how to setup and use Amazon Glacier on your Linux box in order to backup your data in safe way.

Related Posts Plugin for WordPress, Blogger...