Amazon Glacier is a cost effective online file storage service that provides secure, reliable and stable online storage for data archiving backup solution. Amazon Glacier keeps the backup data archive on different and multiple devices that increase the reliability and security of data.
This article will describe you that how to setup and configure the Amazon Glacier on linux system/server.
First of all glaicer-cmd tool that provide the command line management tool for amazon vaut. Steps are given below.
[root@linuxpcfix ~]# git clone git://github.com/uskudnik/amazon-glacier-cmd-interface.git
[root@linuxpcfix ~]# ls -la
[root@linuxpcfix ~]# cd amazon-glacier-cmd-interface/
[root@linuxpcfix ~]# ls -la
[root@linuxpcfix ~]# python setup.py install
[root@linuxpcfix ~]# glacier-cmd –help
Now install the boto on the server
[root@linuxpcfix ~]# git clone git://github.com/boto/boto.git
[root@linuxpcfix ~]# cd boto/
[root@linuxpcfix ~]# python setup.py install
Once installation process get completed, Create vault configuration file and append the following lines as given below.
[aws]
aws_access_key=put your access key
aws_secret_key=put your secret key
[glacier]
region=us-east-1
logfile=~/.glacier-cmd.log
loglevel=INFO
output=print
Create vault as given below
+———–+————————————————-+
| Header | Value |
+———–+————————————————-+
| RequestId | pqS62WYUvbvoahU-XwYchQgM9SJJQaLl2Zd2h6N |
| Location | /136538653411/vaults/my-first-vault |
+———–+————————————————-+
[root@linuxpcfixix ~]#
After that verify the aws console now vault should be listed in your aws console management under Glacier catogery.
Finally To upload archive use “upload” sub command You can upload data from file or data from stdin. To upload from file:
ion “The file description”
Wrote 169.6 MB. Rate 4.19 MB/s.%). Rate 5.39 MB/s, average 4.22 MB/s, ETA 02:42:45.
+————————–+——————————————————————+
| Header | Value |
+————————–+——————————————————————+
| Archive SHA256 tree hash | 2410b4f87516a4e06e68b61ea49cdeed985c8af7551bb4e3ec02393f4e76c5a6 |
| Uploaded file | /home/user/backup.tar.gz |
+————————–+——————————————————————+
[root@linuxpcfixix ~]#
Download and Retrieve the archive from storage.
The following command will start a job retrieving the archive and this request will take fours hours to complete.
Then download the data.
If you want to DELETE an archive then execute the following command.
Listing available vaults.
+——+———————————————————————+————————–+———————–+
| Size | ARN | Created | Vault name |
+——+———————————————————————+————————–+———————–+
| 0 | arn:aws:glacier:us-east-1:136538653411:vaults/my-first-vault| 2015-01-01T07:14:00.781Z | my-first-vault|
+——+———————————————————————+————————–+———————–+
[root@linuxpcfix ~]#
Verify the Vault status
200 OK
+————————–+———-+———-+—————————————————-+————————–+
| LastInventory | Archives | Size | ARN | Created |
+————————–+———-+———-+—————————————————-+————————–+
| 2015-01-01T20:14:31.609Z | 19 | 44782465 | arn:aws:glacier:us-east-1:881745379619:vaults/my-first-vault | 2014-12-31T03:26:05.507Z |
+————————–+———-+———-+—————————————————-+————————–+
To delete a vault
To List an inventory of a vault
As amazon Glacier does not make inventory of a vault automatically it does only on request if there is no inventory available, this command shall initiate
an inventory retrieval job, which generally takes about three/four hours to complete.
To list the jobs
The following command will provide more information of a specific job such as when the specific job was created and what is the current status.
That’s it.